use of teetime.framework.AbstractStage in project TeeTime by teetime-framework.
the class A1ThreadableStageCollectorTest method testVisit.
@Test
public void testVisit() throws Exception {
TestConfiguration config = new TestConfiguration();
Collection<AbstractStage> startStages = ConfigurationFacade.INSTANCE.getStartStages(config);
A1ThreadableStageCollector stageCollector = new A1ThreadableStageCollector();
Traverser traversor = new Traverser(stageCollector);
for (AbstractStage startStage : startStages) {
traversor.traverse(startStage);
}
Set<AbstractStage> newThreadableStages = stageCollector.getThreadableStages();
assertThat(newThreadableStages, hasSize(4));
}
use of teetime.framework.AbstractStage in project TeeTime by teetime-framework.
the class PrioritizedTaskPoolTest method skipDeepestStageLevel.
@Test
public void skipDeepestStageLevel() throws Exception {
threadPool.scheduleStage(producer);
threadPool.scheduleStage(counter4);
AbstractStage nextStage = threadPool.removeNextStage(3);
assertThat(nextStage, is(producer));
}
use of teetime.framework.AbstractStage in project TeeTime by teetime-framework.
the class PrioritizedTaskPoolTest method nextStageIsDeepStageLevel.
@Test
public void nextStageIsDeepStageLevel() throws Exception {
threadPool.scheduleStage(producer);
boolean scheduled = threadPool.scheduleStage(counter4);
assertThat(scheduled, is(true));
AbstractStage nextStage = threadPool.removeNextStage();
assertThat(nextStage, is(counter4));
}
Aggregations