Package de.hybris.platform.util
Class WorkerValueQueueTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.util.WorkerValueQueueTest
-
- All Implemented Interfaces:
JaloSessionHolder
@PerformanceTest public class WorkerValueQueueTest extends HybrisJUnit4Test
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classWorkerValueQueueTest.Master
-
Field Summary
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description WorkerValueQueueTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertAllPKsUsed(int expectedUseCount)protected voidperformLinearPerformanceTest(WorkerValueQueue<PK> queue1, int cycles, int pkCount)voidsetUp()protected java.util.Collection<java.lang.Thread>simulateWorkers(WorkerValueQueue<PK> queue)protected WorkerValueQueueTest.MastersimulateWriter(WorkerValueQueue<PK> queue, int cycles)voidtestPerformance()voidtestQueueCompleteness()voidtestQueueMultipleCycles()protected voidwaitForEmptyQueue(WorkerValueQueue<PK> queue)protected voidwaitForMaster(java.lang.Thread master)protected voidwaitForWorkers(java.util.Collection<java.lang.Thread> workers)-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
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)
-
waitForEmptyQueue
protected void waitForEmptyQueue(WorkerValueQueue<PK> queue)
-
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)
-
simulateWriter
protected WorkerValueQueueTest.Master simulateWriter(WorkerValueQueue<PK> queue, int cycles)
-
simulateWorkers
protected java.util.Collection<java.lang.Thread> simulateWorkers(WorkerValueQueue<PK> queue) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-