Skip to content

Commit 9bfb624

Browse files
committed
Adjust TestingServerMain timeouts to be more lenient
1 parent ba97913 commit 9bfb624

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

galvan/src/main/java/org/terracotta/testing/master/ServerProcess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ public void run() {
397397
boolean exited = false;
398398
while (!exited) {
399399
ping(instance.outputWriter());
400-
exited = instance.waitFor(10, TimeUnit.SECONDS);
400+
exited = instance.waitFor(2, TimeUnit.SECONDS);
401401
}
402402
returnValue = instance.exitValue();
403403
}

terracotta/src/main/java/com/tc/server/TestingServerMain.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private static void deadmansSwitch() {
3737
t = new Thread(()->{
3838
while (true) {
3939
try {
40-
int code = readNextCode(120, TimeUnit.SECONDS);
40+
int code = readNextCode(240, TimeUnit.SECONDS);
4141
switch (code) {
4242
case 's', 'z' -> {
4343
break;
@@ -48,6 +48,7 @@ private static void deadmansSwitch() {
4848
} catch (IOException | InterruptedException io) {
4949

5050
} catch (TimeoutException e) {
51+
System.err.println("TestingServerMain: Timed out waiting for a message from the parent process that it is still alive");
5152
System.exit(2);
5253
}
5354
}

0 commit comments

Comments
 (0)