From 2ff96e5c6f40f574402649823d7cff6a573ba712 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 9 Sep 2021 11:05:04 -0700 Subject: [PATCH] Add static block() method in ClientServerIntegrationTestsSupport to prevent forked, non-daemon JVM processes used in testing from prematurely terminating. --- .../integration/ClientServerIntegrationTestsSupport.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/integration/ClientServerIntegrationTestsSupport.java b/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/integration/ClientServerIntegrationTestsSupport.java index 05a7e49..dbf1b57 100644 --- a/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/integration/ClientServerIntegrationTestsSupport.java +++ b/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/integration/ClientServerIntegrationTestsSupport.java @@ -24,6 +24,7 @@ import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.Optional; +import java.util.Scanner; import java.util.Set; import java.util.concurrent.ConcurrentSkipListSet; import java.util.concurrent.TimeUnit; @@ -115,6 +116,10 @@ public abstract class ClientServerIntegrationTestsSupport extends IntegrationTes return Boolean.getBoolean(PROCESS_RUN_MANUAL_PROPERTY); } + protected static void block() { + new Scanner(System.in).nextLine(); + } + protected static @Nullable ProcessWrapper run(Class type, String... arguments) throws IOException { return run(createDirectory(asDirectoryName(type)), type, arguments); }