Class TestableQueues


  • public final class TestableQueues
    extends Object
    Utility for tests to be able await a Queue becoming empty.
    Author:
    Michael Vorburger.ch
    • Method Detail

      • awaitEmpty

        public static void awaitEmpty​(Queue<?> queue,
                                      long timeout,
                                      TimeUnit timeoutUnit)
        Await for a Queue to be empty.
        Parameters:
        queue - the Queue to await becoming empty
        timeout - timeout as a number
        timeoutUnit - unit of timeout