Search in sources :

Example 6 with ControllerWrapper

use of io.pravega.test.integration.demo.ControllerWrapper in project pravega by pravega.

the class EndToEndTruncationTest method setUp.

@Before
public void setUp() throws Exception {
    executor = Executors.newSingleThreadScheduledExecutor();
    zkTestServer = new TestingServerStarter().start();
    serviceBuilder = ServiceBuilder.newInMemoryBuilder(ServiceBuilderConfig.getDefaultConfig());
    serviceBuilder.initialize();
    StreamSegmentStore store = serviceBuilder.createStreamSegmentService();
    server = new PravegaConnectionListener(false, servicePort, store);
    server.startListening();
    controllerWrapper = new ControllerWrapper(zkTestServer.getConnectString(), false, controllerPort, serviceHost, servicePort, containerCount);
    controllerWrapper.awaitRunning();
}
Also used : StreamSegmentStore(io.pravega.segmentstore.contracts.StreamSegmentStore) TestingServerStarter(io.pravega.test.common.TestingServerStarter) PravegaConnectionListener(io.pravega.segmentstore.server.host.handler.PravegaConnectionListener) ControllerWrapper(io.pravega.test.integration.demo.ControllerWrapper) Before(org.junit.Before)

Example 7 with ControllerWrapper

use of io.pravega.test.integration.demo.ControllerWrapper in project pravega by pravega.

the class EndToEndWithScaleTest method setUp.

@Before
public void setUp() throws Exception {
    executor = Executors.newSingleThreadScheduledExecutor();
    zkTestServer = new TestingServerStarter().start();
    serviceBuilder = ServiceBuilder.newInMemoryBuilder(ServiceBuilderConfig.getDefaultConfig());
    serviceBuilder.initialize();
    StreamSegmentStore store = serviceBuilder.createStreamSegmentService();
    server = new PravegaConnectionListener(false, servicePort, store);
    server.startListening();
    controllerWrapper = new ControllerWrapper(zkTestServer.getConnectString(), false, controllerPort, serviceHost, servicePort, containerCount);
    controllerWrapper.awaitRunning();
}
Also used : StreamSegmentStore(io.pravega.segmentstore.contracts.StreamSegmentStore) TestingServerStarter(io.pravega.test.common.TestingServerStarter) PravegaConnectionListener(io.pravega.segmentstore.server.host.handler.PravegaConnectionListener) ControllerWrapper(io.pravega.test.integration.demo.ControllerWrapper) Before(org.junit.Before)

Example 8 with ControllerWrapper

use of io.pravega.test.integration.demo.ControllerWrapper in project pravega by pravega.

the class BatchClientTest method setUp.

@Before
public void setUp() throws Exception {
    executor = Executors.newSingleThreadScheduledExecutor();
    zkTestServer = new TestingServerStarter().start();
    serviceBuilder = ServiceBuilder.newInMemoryBuilder(ServiceBuilderConfig.getDefaultConfig());
    serviceBuilder.initialize();
    StreamSegmentStore store = serviceBuilder.createStreamSegmentService();
    server = new PravegaConnectionListener(false, servicePort, store);
    server.startListening();
    controllerWrapper = new ControllerWrapper(zkTestServer.getConnectString(), false, controllerPort, serviceHost, servicePort, containerCount);
    controllerWrapper.awaitRunning();
    serializer = new JavaSerializer<>();
}
Also used : StreamSegmentStore(io.pravega.segmentstore.contracts.StreamSegmentStore) TestingServerStarter(io.pravega.test.common.TestingServerStarter) PravegaConnectionListener(io.pravega.segmentstore.server.host.handler.PravegaConnectionListener) ControllerWrapper(io.pravega.test.integration.demo.ControllerWrapper) Before(org.junit.Before)

Example 9 with ControllerWrapper

use of io.pravega.test.integration.demo.ControllerWrapper in project pravega by pravega.

the class ControllerBootstrapTest method setup.

@Before
public void setup() {
    final String serviceHost = "localhost";
    final int containerCount = 4;
    // 1. Start ZK
    try {
        zkTestServer = new TestingServerStarter().start();
    } catch (Exception e) {
        Assert.fail("Failed starting ZK test server");
    }
    // 2. Start controller
    try {
        controllerWrapper = new ControllerWrapper(zkTestServer.getConnectString(), false, controllerPort, serviceHost, servicePort, containerCount);
    } catch (Exception e) {
        Assert.fail("Failed starting ControllerWrapper");
    }
}
Also used : TestingServerStarter(io.pravega.test.common.TestingServerStarter) CompletionException(java.util.concurrent.CompletionException) ControllerWrapper(io.pravega.test.integration.demo.ControllerWrapper) Before(org.junit.Before)

Example 10 with ControllerWrapper

use of io.pravega.test.integration.demo.ControllerWrapper in project pravega by pravega.

the class ControllerFailoverTest method testSessionExpiryToleranceAllServices.

@Test(timeout = 120000)
public void testSessionExpiryToleranceAllServices() throws Exception {
    final int controllerPort = TestUtils.getAvailableListenPort();
    final String serviceHost = "localhost";
    final int containerCount = 4;
    final ControllerWrapper controllerWrapper = new ControllerWrapper(zkTestServer.getConnectString(), false, false, controllerPort, serviceHost, servicePort, containerCount, TestUtils.getAvailableListenPort());
    testSessionExpiryTolerance(controllerWrapper, controllerPort);
}
Also used : ControllerWrapper(io.pravega.test.integration.demo.ControllerWrapper) Test(org.junit.Test)

Aggregations

ControllerWrapper (io.pravega.test.integration.demo.ControllerWrapper)20 TestingServerStarter (io.pravega.test.common.TestingServerStarter)17 StreamSegmentStore (io.pravega.segmentstore.contracts.StreamSegmentStore)16 PravegaConnectionListener (io.pravega.segmentstore.server.host.handler.PravegaConnectionListener)16 Before (org.junit.Before)14 ServiceBuilder (io.pravega.segmentstore.server.store.ServiceBuilder)5 Test (org.junit.Test)5 ConnectionFactoryImpl (io.pravega.client.netty.impl.ConnectionFactoryImpl)2 StreamConfiguration (io.pravega.client.stream.StreamConfiguration)2 ClientFactoryImpl (io.pravega.client.stream.impl.ClientFactoryImpl)2 Controller (io.pravega.client.stream.impl.Controller)2 Cleanup (lombok.Cleanup)2 TestingServer (org.apache.curator.test.TestingServer)2 ClientFactory (io.pravega.client.ClientFactory)1 ReaderGroupManagerImpl (io.pravega.client.admin.impl.ReaderGroupManagerImpl)1 ScalingPolicy (io.pravega.client.stream.ScalingPolicy)1 Stream (io.pravega.client.stream.Stream)1 ControllerImpl (io.pravega.client.stream.impl.ControllerImpl)1 JavaSerializer (io.pravega.client.stream.impl.JavaSerializer)1 StreamImpl (io.pravega.client.stream.impl.StreamImpl)1