use of io.pravega.client.connection.impl.ConnectionPool in project pravega by pravega.
the class ControllerStreamMetadataTest method streamManagerImpltest.
@Test(timeout = 10000)
public void streamManagerImpltest() {
ClientConfig config = ClientConfig.builder().build();
@Cleanup ConnectionPool cp = new ConnectionPoolImpl(config, new SocketConnectionFactoryImpl(config));
@Cleanup StreamManager streamManager = new StreamManagerImpl(controller, cp);
// Create and delete scope
assertTrue(streamManager.createScope(SCOPE));
assertTrue(streamManager.deleteScope(SCOPE));
// Create scope twice
assertTrue(streamManager.createScope(SCOPE));
assertFalse(streamManager.createScope(SCOPE));
assertTrue(streamManager.deleteScope(SCOPE));
// Delete twice
assertFalse(streamManager.deleteScope(SCOPE));
}
Aggregations