use of io.pravega.test.system.framework.Utils.REST_PORT in project pravega by pravega.
the class PravegaControllerTest method controllerTest.
/**
* Invoke the controller test.
* The test fails in case controller is not running on given ports.
*/
@Test
public void controllerTest() {
log.debug("Start execution of controllerTest");
Service con = Utils.createPravegaControllerService(null);
List<URI> conUri = con.getServiceDetails();
log.debug("Controller Service URI details: {} ", conUri);
assertTrue(conUri.stream().map(URI::getPort).allMatch(port -> {
switch(Utils.EXECUTOR_TYPE) {
case REMOTE_SEQUENTIAL:
return port == PravegaControllerService.CONTROLLER_PORT || port == PravegaControllerService.REST_PORT;
case DOCKER:
return port == CONTROLLER_GRPC_PORT || port == REST_PORT;
case KUBERNETES:
default:
return port == CONTROLLER_GRPC_PORT || port == CONTROLLER_REST_PORT;
}
}));
log.debug("ControllerTest execution completed");
}
Aggregations