use of com.twitter.common.application.ShutdownRegistry.ShutdownRegistryImpl in project commons by twitter.
the class ServerSetModuleTest method mySetUp.
@Before
public void mySetUp() {
control = EasyMock.createControl();
serverSet = control.createMock(ServerSet.class);
shutdownRegistry = new ShutdownRegistryImpl();
zooKeeperClient = createZkClient();
Set<ServiceRunner> localServices = ImmutableSet.of();
localServiceRegistry = new LocalServiceRegistry(Providers.of(localServices), shutdownRegistry);
}
use of com.twitter.common.application.ShutdownRegistry.ShutdownRegistryImpl in project commons by twitter.
the class BaseZooKeeperTest method setUp.
@Before
public final void setUp() throws Exception {
final ShutdownRegistryImpl shutdownRegistry = new ShutdownRegistryImpl();
addTearDown(new TearDown() {
@Override
public void tearDown() {
shutdownRegistry.execute();
}
});
zkTestServer = new ZooKeeperTestServer(0, shutdownRegistry, defaultSessionTimeout);
zkTestServer.startNetwork();
}
Aggregations