You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2016/02/11 17:42:43 UTC

[09/31] lucene-solr git commit: fix compilation errors

fix compilation errors


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

Branch: refs/heads/master
Commit: d9f20f53edd9dc5895ad18e1844fb4ae9652189e
Parents: 8889469
Author: Michael McCandless <ma...@mikemccandless.com>
Authored: Tue Feb 2 06:16:34 2016 -0500
Committer: Mike McCandless <mi...@apache.org>
Committed: Tue Feb 2 06:16:34 2016 -0500

----------------------------------------------------------------------
 .../replicator/nrt/TestNRTReplication.java      | 36 +++++++++++---------
 1 file changed, 19 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d9f20f53/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java
----------------------------------------------------------------------
diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java
index b2240eb..e2824af 100644
--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java
+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java
@@ -17,6 +17,15 @@ package org.apache.lucene.replicator.nrt;
  * limitations under the License.
  */
 
+import org.apache.lucene.document.Document;
+import org.apache.lucene.util.IOUtils;
+import org.apache.lucene.util.LineFileDocs;
+import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
+import org.apache.lucene.util.LuceneTestCase.SuppressSysoutChecks;
+import org.apache.lucene.util.LuceneTestCase;
+
+import com.carrotsearch.randomizedtesting.SeedUtils;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -25,18 +34,10 @@ import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.regex.Pattern;
 
-import org.apache.lucene.document.Document;
-import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LineFileDocs;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
-import org.apache.lucene.util.LuceneTestCase.SuppressSysoutChecks;
-
-import com.carrotsearch.randomizedtesting.SeedUtils;
-
 // MockRandom's .sd file has no index header/footer:
 @SuppressCodecs({"MockRandom", "Memory", "Direct", "SimpleText"})
 @SuppressSysoutChecks(bugUrl = "Stuff gets printed, important stuff for debugging a failure")
@@ -151,6 +152,7 @@ public class TestNRTReplication extends LuceneTestCase {
     final boolean finalWillCrash = willCrash;
 
     // Baby sits the child process, pulling its stdout and printing to our stdout:
+    AtomicBoolean nodeClosing = new AtomicBoolean();
     Thread pumper = ThreadPumper.start(
                                        new Runnable() {
                                          @Override
@@ -170,11 +172,11 @@ public class TestNRTReplication extends LuceneTestCase {
                                              throw new RuntimeException("node " + id + " process had unexpected non-zero exit status=" + exitValue);
                                            }
                                          }
-                                       }, r, System.out, null);
+                                       }, r, System.out, null, nodeClosing);
     pumper.setName("pump" + id);
 
     message("top: node=" + id + " started at tcpPort=" + tcpPort + " initCommitVersion=" + initCommitVersion + " initInfosVersion=" + initInfosVersion);
-    return new NodeProcess(p, id, tcpPort, pumper, isPrimary, initCommitVersion, initInfosVersion);
+    return new NodeProcess(p, id, tcpPort, pumper, isPrimary, initCommitVersion, initInfosVersion, nodeClosing);
   }
 
   public void testReplicateDeleteAllDocuments() throws Exception {
@@ -220,7 +222,7 @@ public class TestNRTReplication extends LuceneTestCase {
     assertEquals(0, hitCount);
 
     // Refresh primary, which also pushes to replica:
-    long primaryVersion1 = primary.flush();
+    long primaryVersion1 = primary.flush(0);
     assertTrue(primaryVersion1 > 0);
 
     long version2;
@@ -259,7 +261,7 @@ public class TestNRTReplication extends LuceneTestCase {
     assertEquals(10, hitCount);
     
     // Refresh primary, which also pushes to replica:
-    long primaryVersion2 = primary.flush();
+    long primaryVersion2 = primary.flush(0);
     assertTrue(primaryVersion2 > primaryVersion1);
 
     // Wait for replica to show the change
@@ -285,7 +287,7 @@ public class TestNRTReplication extends LuceneTestCase {
     }
 
     // Refresh primary, which also pushes to replica:
-    long primaryVersion3 = primary.flush();
+    long primaryVersion3 = primary.flush(0);
     assertTrue(primaryVersion3 > primaryVersion2);
 
     // Wait for replica to show the change
@@ -344,7 +346,7 @@ public class TestNRTReplication extends LuceneTestCase {
     }
 
     // Refresh primary, which also pushes to replica:
-    long primaryVersion1 = primary.flush();
+    long primaryVersion1 = primary.flush(0);
     assertTrue(primaryVersion1 > 0);
 
     // Index 10 more docs into primary:
@@ -354,13 +356,13 @@ public class TestNRTReplication extends LuceneTestCase {
     }
 
     // Refresh primary, which also pushes to replica:
-    long primaryVersion2 = primary.flush();
+    long primaryVersion2 = primary.flush(0);
     assertTrue(primaryVersion2 > primaryVersion1);
 
     primary.forceMerge(primaryC);
 
     // Refresh primary, which also pushes to replica:
-    long primaryVersion3 = primary.flush();
+    long primaryVersion3 = primary.flush(0);
     assertTrue(primaryVersion3 > primaryVersion2);
 
     Connection replicaC = new Connection(replica.tcpPort);