blob: 75c8f24a16d2666d65e5469c6d3ab7112b8d2c51 [file] [log] [blame]
package test.timeout;
import org.testng.annotations.Test;
public class InvocationTimeOutSampleTest {
@Test(invocationCount = 5, invocationTimeOut = 2_000)
public void shouldPass() {
try {
Thread.sleep(250);
} catch (InterruptedException handled) {
Thread.currentThread().interrupt();
}
}
@Test(invocationCount = 5, invocationTimeOut = 1_000)
public void shouldFail() {
try {
Thread.sleep(250);
} catch (InterruptedException handled) {
Thread.currentThread().interrupt();
}
}
}