All Downloads are FREE. Search and download functionalities are using the official Maven repository.

test.tck.msgflow.callflows.AssertUntil Maven / Gradle / Ivy

There is a newer version: 1.3.0-91
Show newest version
package test.tck.msgflow.callflows;

public class AssertUntil {
    private static final long POLLING_FREQ = 500; 
    public static boolean assertUntil(TestAssertion assertion, long millis) throws InterruptedException{
        long timeout = 0;
        while (timeout < millis) {
            if (assertion.assertCondition()) {
                return true;
            }
            Thread.sleep(POLLING_FREQ);
            timeout = timeout + POLLING_FREQ;
        }
        return false;        
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy