diff options
| -rw-r--r-- | test/004-ThreadStress/src/Main.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/004-ThreadStress/src/Main.java b/test/004-ThreadStress/src/Main.java index 7acd950e68..d5b389f628 100644 --- a/test/004-ThreadStress/src/Main.java +++ b/test/004-ThreadStress/src/Main.java @@ -448,9 +448,14 @@ public class Main implements Runnable { thread.join(); } catch (InterruptedException e) { } - System.out.println("Thread exited for " + id + " with " - + (operationsPerThread - threadStress.nextOperation) - + " operations remaining."); + try { + System.out.println("Thread exited for " + id + " with " + + (operationsPerThread - threadStress.nextOperation) + + " operations remaining."); + } catch (OutOfMemoryError e) { + // Ignore OOME since we need to print "Finishing worker" for the test + // to pass. + } } System.out.println("Finishing worker"); } |