Class Barrier
java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.util.Barrier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longTime limit for tasks waiting on the barrier.static final longTime to wait for something which is expected not to happen (e.g.static final longTime to wait for something which is expected to happen (e.g. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertAllNotAwaiting(Collection<? extends Barrier> barriers) Assert that no task waits on any of a set of barriers within EXPECTED_FAIL_TIME_MSvoidAssert that at least one task awaits on this barrier within WAIT_TIME_MSvoidAssert that no task awaits this barrier within EXPECTED_FAIL_TIME_MSvoidawait()voidintvoidopen()
-
Field Details
-
BARRIER_WAIT_TIME_MS
public static final long BARRIER_WAIT_TIME_MSTime limit for tasks waiting on the barrier. -
EXPECTED_FAIL_TIME_MS
public static final long EXPECTED_FAIL_TIME_MSTime to wait for something which is expected not to happen (e.g. assert that a task does not complete) -
WAIT_TIME_MS
public static final long WAIT_TIME_MSTime to wait for something which is expected to happen (e.g. assert that a task completes)
-
-
Constructor Details
-
Barrier
public Barrier()
-
-
Method Details
-
await
public void await() -
awaitInterruptably
- Throws:
InterruptedException
-
open
public void open() -
countWaiting
public int countWaiting() -
assertAwaits
public void assertAwaits()Assert that at least one task awaits on this barrier within WAIT_TIME_MS -
assertNotAwaiting
public void assertNotAwaiting()Assert that no task awaits this barrier within EXPECTED_FAIL_TIME_MS -
assertAllNotAwaiting
Assert that no task waits on any of a set of barriers within EXPECTED_FAIL_TIME_MS- Parameters:
barriers- the barriers to check
-