use of io.scalecube.services.transport.rsocket.RSocketServiceTransport in project scalecube by scalecube.
the class ServiceRemoteTest method test_remote_serviceA_calls_serviceB_with_timeout.
@Test
public void test_remote_serviceA_calls_serviceB_with_timeout() {
// getting proxy from any node at any given time.
CoarseGrainedServiceImpl another = new CoarseGrainedServiceImpl();
// Create microservices instance cluster.
Microservices ms = Microservices.builder().discovery(ServiceRemoteTest::serviceDiscovery).transport(RSocketServiceTransport::new).services(// add service a and b
another).startAwait();
// Get a proxy to the service api.
CoarseGrainedService service = gateway.call().api(CoarseGrainedService.class);
InternalServiceException exception = assertThrows(InternalServiceException.class, () -> Mono.from(service.callGreetingTimeout("joe")).block());
assertTrue(exception.getMessage().contains("Did not observe any item or terminal signal"));
System.out.println("done");
ms.shutdown().then(Mono.delay(TIMEOUT2)).block();
}
Aggregations