Skip to content
Snippets Groups Projects
Commit 3d6ee36d authored by Christian Wulf's avatar Christian Wulf
Browse files

removed redundancy in perf test

parent 46e3b3a0
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ public class RunnableConsumerStageTest {
@Test
public void testWaitingInfinitely() throws Exception {
WaitStrategyConfiguration waitStrategyConfiguration = new WaitStrategyConfiguration(300, 1);
WaitStrategyConfiguration waitStrategyConfiguration = new WaitStrategyConfiguration(300, 42);
final Analysis analysis = new Analysis(waitStrategyConfiguration);
analysis.init();
......@@ -35,7 +35,7 @@ public class RunnableConsumerStageTest {
@Test
public void testWaitingFinitely() throws Exception {
WaitStrategyConfiguration waitStrategyConfiguration = new WaitStrategyConfiguration(300, 1);
WaitStrategyConfiguration waitStrategyConfiguration = new WaitStrategyConfiguration(300, 42);
final Analysis analysis = new Analysis(waitStrategyConfiguration);
analysis.init();
......@@ -47,13 +47,10 @@ public class RunnableConsumerStageTest {
});
thread.start();
Thread.sleep(200);
assertEquals(State.WAITING, thread.getState());
assertEquals(0, waitStrategyConfiguration.getCollectorSink().getElements().size());
Thread.sleep(400);
Thread.sleep(200);
assertEquals(State.TERMINATED, thread.getState());
assertEquals(1, waitStrategyConfiguration.getCollectorSink().getElements().get(0));
assertEquals(42, waitStrategyConfiguration.getCollectorSink().getElements().get(0));
assertEquals(1, waitStrategyConfiguration.getCollectorSink().getElements().size());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment