diff --git a/infinispan-remote/reactive-api/src/main/java/org/infinispan/tutorial/simple/reactive/InfinispanReactiveApi.java b/infinispan-remote/reactive-api/src/main/java/org/infinispan/tutorial/simple/reactive/InfinispanReactiveApi.java index 9b5eb711..00ba7d5f 100644 --- a/infinispan-remote/reactive-api/src/main/java/org/infinispan/tutorial/simple/reactive/InfinispanReactiveApi.java +++ b/infinispan-remote/reactive-api/src/main/java/org/infinispan/tutorial/simple/reactive/InfinispanReactiveApi.java @@ -53,6 +53,8 @@ static void manipulateCacheReactive() { .onItem().delayIt().onExecutor(executor).by(Duration.ofSeconds(1)) .invoke(v -> System.out.printf("%s -- %s\n", LocalDateTime.now(), v)) .await().atMost(Duration.ofSeconds(2)); + + executor.shutdown(); } public static final void connect() { @@ -77,7 +79,7 @@ public static final void connect() { try { TutorialsConnectorHelper.startInfinispanContainer(); builder = createHotRodConfigurationBuilder(); - builder.addServer().host(HOST).port(INFINISPAN_CONTAINER.getFirstMappedPort()); + builder.addServer().host(HOST).port(INFINISPAN_CONTAINER.getMappedPort(SINGLE_PORT)); infinispan = Infinispan.create(builder.build()); clearCache(); } catch (Exception ex) {