public static HBaseClassTestRule forClass(Class<?> clazz) { return new HBaseClassTestRule(clazz, Timeout.builder().withLookingForStuckThread(true) .withTimeout(getTimeoutInSeconds(clazz), TimeUnit.SECONDS).build()); }
public static TestRule getTimeoutRule(int timeout, TimeUnit unit) { return IS_DEBUG ? new TestName() : Timeout.builder().withTimeout(timeout, unit).build(); }
return Timeout.builder().withTimeout(waitLonger * defaultTimeoutSeconds(), TimeUnit.SECONDS) .withLookingForStuckThread(true).build();
public static TestRule timeoutRule(long timeout, TimeUnit timeUnit) { return new DisableOnDebug(Timeout.builder().withTimeout(timeout, timeUnit) .withLookingForStuckThread(true).build()); }
/** * Creates a rule (chain) out of a gateway or other rule, adding extra rules as follows:<ol> * <li> a timeout rule * <li> a rule to print console messages at the start and end of each test method and print trace level * log messages on test failure. * </ol> * @param rule Rule to startup and stop gateway * @param timeout The maximum allowed time duration of each test (including the gateway rule) * @param timeUnit The unit for the timeout * @return A TestRule which should be the only public @Rule in our robot tests */ public static RuleChain createRuleChain(TestRule gateway, long timeout, TimeUnit timeUnit) { TestRule trace = new MethodExecutionTrace(); TestRule timeoutRule = new DisableOnDebug(Timeout.builder().withTimeout(timeout, timeUnit) .withLookingForStuckThread(true).build()); return RuleChain.outerRule(trace).around(timeoutRule).around(gateway); }
/** * Creates a rule (chain) out of a k3po rule and gateway rule, adding extra rules as follows:<ol> * <li> a timeout rule * <li> a rule to print console messages at the start and end of each test method and print trace level * log messages on test failure. * </ol> * @param gateway Rule to start up and shut down the gateway (or acceptor or etc) * @param robot Rule to startup and stop k3po * @param timeout The maximum allowed time duration of each test * @param timeUnit The unit for the timeout * @return A TestRule which should be the only public @Rule in our robot tests */ public static RuleChain createRuleChain(TestRule gateway, K3poRule robot, long timeout, TimeUnit timeUnit) { TestRule trace = new MethodExecutionTrace(); TestRule timeoutRule = new DisableOnDebug(Timeout.builder().withTimeout(timeout, timeUnit) .withLookingForStuckThread(true).build()); return RuleChain.outerRule(trace).around(gateway).around(robot).around(timeoutRule); }
public static HBaseClassTestRule forClass(Class<?> clazz) { return new HBaseClassTestRule(clazz, Timeout.builder().withLookingForStuckThread(true) .withTimeout(getTimeoutInSeconds(clazz), TimeUnit.SECONDS).build()); }
public static HBaseClassTestRule forClass(Class<?> clazz) { return new HBaseClassTestRule(clazz, Timeout.builder().withLookingForStuckThread(true) .withTimeout(getTimeoutInSeconds(clazz), TimeUnit.SECONDS).build()); }