Skip to content

Commit 81db8b8

Browse files
committed
Loosen up the thread death failure expectations
Sometimes the test fails with "SystemExit: 123", which is OK with me. Not *ideal* that there is not homogeneous behavior across all executions and platforms, but both of these failure messages are reasonable.
1 parent 522c32c commit 81db8b8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/test/java/org/apposed/appose/ServiceTest.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,14 @@ public void testPythonSysExit() throws InterruptedException, IOException {
169169
// that Appose's python_worker handles this situation well.
170170
Task task = service.task("import sys\nsys.exit(123)").waitFor();
171171

172-
// Is the tag flagged as failed due to thread death?
172+
// Is the tag flagged as failed?
173173
assertSame(TaskStatus.FAILED, task.status);
174-
assertEquals("thread death", task.error);
174+
175+
// The failure should be either "thread death" or a "SystemExit" message.
176+
assertTrue(
177+
task.error.equals("thread death") ||
178+
task.error.contains("SystemExit: 123")
179+
);
175180
}
176181
}
177182

0 commit comments

Comments
 (0)