java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.util.Barrier

public class Barrier extends Object
  • Field Details

    • BARRIER_WAIT_TIME_MS

      public static final long BARRIER_WAIT_TIME_MS
      Time limit for tasks waiting on the barrier.
    • EXPECTED_FAIL_TIME_MS

      public static final long EXPECTED_FAIL_TIME_MS
      Time 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_MS
      Time 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

      public void awaitInterruptably() throws InterruptedException
      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

      public static void assertAllNotAwaiting(Collection<? extends Barrier> barriers)
      Assert that no task waits on any of a set of barriers within EXPECTED_FAIL_TIME_MS
      Parameters:
      barriers - the barriers to check