use of com.yahoo.component.chain.ChainedComponent in project vespa by vespa-engine.
the class ChainBuilderTest method testAfterAll2.
@Test
public void testAfterAll2() throws InstantiationException, IllegalAccessException {
ChainBuilder chainBuilder = createDependencyHandler();
addAtoG(chainBuilder);
ChainedComponent afterAll1 = new AfterAll();
chainBuilder.addComponent(afterAll1);
List<ChainedComponent> resolution = chainBuilder.orderNodes().components();
assertEquals(afterAll1, resolution.get(resolution.size() - 1));
}
use of com.yahoo.component.chain.ChainedComponent in project vespa by vespa-engine.
the class ChainBuilderTest method testAfterAll1.
@Test
public void testAfterAll1() throws InstantiationException, IllegalAccessException {
ChainBuilder chainBuilder = createDependencyHandler();
ChainedComponent afterAll1 = new AfterAll();
chainBuilder.addComponent(afterAll1);
addAtoG(chainBuilder);
List<ChainedComponent> resolution = chainBuilder.orderNodes().components();
assertEquals(afterAll1, resolution.get(resolution.size() - 1));
}
use of com.yahoo.component.chain.ChainedComponent in project vespa by vespa-engine.
the class ChainBuilderTest method testPhaseAndSearcher.
@Test
public void testPhaseAndSearcher() {
ChainBuilder depHandler = newChainBuilder();
depHandler.addPhase(new Phase("phase1", set("phase2"), Collections.<String>emptySet()));
depHandler.addPhase(new Phase("phase2", set("phase3"), set("phase1")));
depHandler.addPhase(new Phase("phase3", Collections.<String>emptySet(), set("phase2", "phase1")));
ChainedComponent first = new First();
ChainedComponent second = new Second();
depHandler.addComponent(first);
depHandler.addComponent(second);
assertEquals(depHandler.orderNodes().components(), Arrays.asList(first, second));
}
use of com.yahoo.component.chain.ChainedComponent in project vespa by vespa-engine.
the class ChainBuilderTest method testAfterImplicitProvides.
@Test
public void testAfterImplicitProvides() throws InstantiationException, IllegalAccessException {
ChainBuilder chainBuilder = createDependencyHandler();
ChainedComponent afterProvidesNothing = new AfterProvidesNothing();
ChainedComponent providesNothing = new ProvidesNothing();
chainBuilder.addComponent(afterProvidesNothing);
chainBuilder.addComponent(providesNothing);
List<ChainedComponent> resolution = chainBuilder.orderNodes().components();
assertEquals(providesNothing, resolution.get(0));
assertEquals(afterProvidesNothing, resolution.get(1));
}
Aggregations