Class Barrier
java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.util.Barrier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Time limit for tasks waiting on the barrier.static final long
Time to wait for something which is expected not to happen (e.g.static final long
Time to wait for something which is expected to happen (e.g. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertAllNotAwaiting
(Collection<? extends Barrier> barriers) Assert that no task waits on any of a set of barriers within EXPECTED_FAIL_TIME_MSvoid
Assert that at least one task awaits on this barrier within WAIT_TIME_MSvoid
Assert that no task awaits this barrier within EXPECTED_FAIL_TIME_MSvoid
await()
void
int
void
open()
-
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
-