Class WorkerValueQueueTest

    • Constructor Detail

      • WorkerValueQueueTest

        public WorkerValueQueueTest()
    • Method Detail

      • setUp

        public void setUp()
      • testPerformance

        public void testPerformance()
      • testQueueMultipleCycles

        public void testQueueMultipleCycles()
                                     throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • testQueueCompleteness

        public void testQueueCompleteness()
                                   throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • performLinearPerformanceTest

        protected void performLinearPerformanceTest​(WorkerValueQueue<PK> queue1,
                                                    int cycles,
                                                    int pkCount)
      • assertAllPKsUsed

        protected void assertAllPKsUsed​(int expectedUseCount)
      • waitForMaster

        protected void waitForMaster​(java.lang.Thread master)
                              throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • waitForWorkers

        protected void waitForWorkers​(java.util.Collection<java.lang.Thread> workers)
      • simulateWorkers

        protected java.util.Collection<java.lang.Thread> simulateWorkers​(WorkerValueQueue<PK> queue)
                                                                  throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException