You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2018/04/10 14:11:48 UTC

[09/50] lucene-solr:jira/solr-12181: Moved system.out from the forked subprocess to test because it uses inherited i/o handles directly and shows as unexpected JVM output.

Moved system.out from the forked subprocess to test because it uses inherited i/o handles directly and shows as unexpected JVM output.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/469979dc
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/469979dc
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/469979dc

Branch: refs/heads/jira/solr-12181
Commit: 469979dc25ac999069267ef4f542fa9bb95bd3d6
Parents: ef902f9
Author: Dawid Weiss <da...@carrotsearch.com>
Authored: Wed Apr 4 21:54:27 2018 +0200
Committer: Dawid Weiss <da...@carrotsearch.com>
Committed: Wed Apr 4 21:54:27 2018 +0200

----------------------------------------------------------------------
 .../apache/lucene/codecs/TestCodecLoadingDeadlock.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/469979dc/lucene/core/src/test/org/apache/lucene/codecs/TestCodecLoadingDeadlock.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/TestCodecLoadingDeadlock.java b/lucene/core/src/test/org/apache/lucene/codecs/TestCodecLoadingDeadlock.java
index 8137f23..8080c87 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/TestCodecLoadingDeadlock.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/TestCodecLoadingDeadlock.java
@@ -61,8 +61,11 @@ public class TestCodecLoadingDeadlock extends Assert {
         .get(rnd.nextInt(avail.size()));
     final String dvfName = new ArrayList<>(avail = DocValuesFormat.availableDocValuesFormats())
         .get(rnd.nextInt(avail.size()));
-    
-    // spawn separate JVM:
+
+    System.out.println(String.format(Locale.ROOT,
+        "codec: %s, pf: %s, dvf: %s", codecName, pfName, dvfName));
+
+    // Fork a separate JVM to reinitialize classes.
     final Process p = new ProcessBuilder(
       Paths.get(System.getProperty("java.home"), "bin", "java").toString(),
       "-cp",
@@ -86,9 +89,6 @@ public class TestCodecLoadingDeadlock extends Assert {
     final String pfName = args[1];
     final String dvfName = args[2];
 
-    System.out.println(String.format(Locale.ROOT,
-        "codec: %s, pf: %s, dvf: %s", codecName, pfName, dvfName));
-
     final int numThreads = 14; // two times the modulo in switch statement below
     final CopyOnWriteArrayList<Thread> allThreads = new CopyOnWriteArrayList<>();
     final ExecutorService pool = Executors.newFixedThreadPool(numThreads, new NamedThreadFactory("deadlockchecker") {