Search in sources :

Example 1 with DeactivatedContainer

use of com.yahoo.jdisc.application.DeactivatedContainer in project vespa by vespa-engine.

the class ContainerTerminationTestCase method requireThatAppContextIsFromBuilder.

@Test
public void requireThatAppContextIsFromBuilder() {
    TestDriver driver = TestDriver.newSimpleApplicationInstanceWithoutOsgi();
    ContainerBuilder builder = driver.newContainerBuilder();
    Object obj = new Object();
    builder.setAppContext(obj);
    driver.activateContainer(builder);
    DeactivatedContainer container = driver.activateContainer(null);
    assertSame(obj, container.appContext());
    assertTrue(driver.close());
}
Also used : DeactivatedContainer(com.yahoo.jdisc.application.DeactivatedContainer) ContainerBuilder(com.yahoo.jdisc.application.ContainerBuilder) TestDriver(com.yahoo.jdisc.test.TestDriver) Test(org.junit.Test)

Aggregations

ContainerBuilder (com.yahoo.jdisc.application.ContainerBuilder)1 DeactivatedContainer (com.yahoo.jdisc.application.DeactivatedContainer)1 TestDriver (com.yahoo.jdisc.test.TestDriver)1 Test (org.junit.Test)1