Search in sources :

Example 6 with RESTServer

use of io.pravega.shared.rest.RESTServer in project pravega by pravega.

the class HealthTests method setup.

@Before
public void setup() throws Exception {
    serverConfig = getServerConfig();
    healthServiceManager = new HealthServiceManager(Duration.ofMillis(100));
    restServer = new RESTServer(serverConfig, Set.of(new HealthImpl(null, healthServiceManager.getEndpoint())));
    healthServiceManager.start();
    restServer.startAsync();
    restServer.awaitRunning();
    client = createJerseyClient();
}
Also used : HealthServiceManager(io.pravega.shared.health.HealthServiceManager) HealthImpl(io.pravega.shared.health.bindings.resources.HealthImpl) RESTServer(io.pravega.shared.rest.RESTServer) Before(org.junit.Before)

Example 7 with RESTServer

use of io.pravega.shared.rest.RESTServer in project pravega by pravega.

the class PingTest method setup.

@Before
public void setup() throws Exception {
    serverConfig = getServerConfig();
    restServer = new RESTServer(serverConfig, Set.of(new PingImpl()));
    restServer.startAsync();
    restServer.awaitRunning();
    client = createJerseyClient();
}
Also used : RESTServer(io.pravega.shared.rest.RESTServer) PingImpl(io.pravega.controller.server.rest.resources.PingImpl) Before(org.junit.Before)

Aggregations

RESTServer (io.pravega.shared.rest.RESTServer)7 SocketConnectionFactoryImpl (io.pravega.client.connection.impl.SocketConnectionFactoryImpl)3 LocalController (io.pravega.controller.server.eventProcessor.LocalController)3 StreamMetadataResourceImpl (io.pravega.controller.server.rest.resources.StreamMetadataResourceImpl)3 HealthServiceManager (io.pravega.shared.health.HealthServiceManager)3 HealthImpl (io.pravega.shared.health.bindings.resources.HealthImpl)3 Before (org.junit.Before)3 ControllerService (io.pravega.controller.server.ControllerService)2 AuthHandlerManager (io.pravega.shared.rest.security.AuthHandlerManager)2 ArrayList (java.util.ArrayList)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 AbstractIdleService (com.google.common.util.concurrent.AbstractIdleService)1 AuthFileUtils.credentialsAndAclAsString (io.pravega.auth.AuthFileUtils.credentialsAndAclAsString)1 ClientConfig (io.pravega.client.ClientConfig)1 ConnectionFactory (io.pravega.client.connection.impl.ConnectionFactory)1 ConnectionPool (io.pravega.client.connection.impl.ConnectionPool)1 ConnectionPoolImpl (io.pravega.client.connection.impl.ConnectionPoolImpl)1 LoggerHelpers (io.pravega.common.LoggerHelpers)1 Cluster (io.pravega.common.cluster.Cluster)1 ClusterType (io.pravega.common.cluster.ClusterType)1