changeset 83:d586befd5a2e

Yak shaving: merge some util methods to TerminationRunner.
author shade
date Thu, 13 Mar 2014 00:04:23 +0400
parents 8b1375bd1243
children f0b05b6340d4
files jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/Runner.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/TerminationRunner.java
diffstat 2 files changed, 4 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/Runner.java	Wed Mar 12 23:59:42 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/Runner.java	Thu Mar 13 00:04:23 2014 +0400
@@ -119,16 +119,6 @@
 
     public abstract int requiredThreads();
 
-    protected void hardExit() {
-        testLog.flush();
-        testLog.close();
-        System.exit(0);
-    }
-
-    public void warn(String s) {
-        testLog.println(s);
-    }
-
     protected void waitFor(String testName, Collection<Future<?>> tasks) {
         long startTime = System.nanoTime();
         boolean allStopped = false;
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/TerminationRunner.java	Wed Mar 12 23:59:42 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/TerminationRunner.java	Thu Mar 13 00:04:23 2014 +0400
@@ -73,8 +73,10 @@
             dump(testName, results);
 
             if (results.count(Outcome.STALE) > 0) {
-                warn("Have stale threads, forcing VM to exit");
-                hardExit();
+                testLog.println("Have stale threads, forcing VM to exit");
+                testLog.flush();
+                testLog.close();
+                System.exit(0);
             }
         }
         testLog.println();