lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject lucene-solr:master: SOLR-10114: fix flakey TestRecovery
Date Thu, 16 Feb 2017 20:12:56 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 6cbda0266 -> 7a45f1015


SOLR-10114: fix flakey TestRecovery


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

Branch: refs/heads/master
Commit: 7a45f1015e73bc4f793a63be6b7414d53e008e05
Parents: 6cbda02
Author: yonik <yonik@apache.org>
Authored: Thu Feb 16 15:12:35 2017 -0500
Committer: yonik <yonik@apache.org>
Committed: Thu Feb 16 15:12:44 2017 -0500

----------------------------------------------------------------------
 .../org/apache/solr/search/TestRecovery.java    | 48 ++++++++++----------
 1 file changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a45f101/solr/core/src/test/org/apache/solr/search/TestRecovery.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/TestRecovery.java b/solr/core/src/test/org/apache/solr/search/TestRecovery.java
index 8dffac2..4b0c51c 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRecovery.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRecovery.java
@@ -292,10 +292,10 @@ public class TestRecovery extends SolrTestCaseJ4 {
   @Test
   public void testLogReplayWithReorderedDBQ() throws Exception {
     testLogReplayWithReorderedDBQWrapper(() -> {
-          updateJ(jsonAdd(sdoc("id", "B1", "_version_", "1010")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
-          updateJ(jsonDelQ("id:B2"), params(DISTRIB_UPDATE_PARAM, FROM_LEADER, "_version_",
"-1017")); // This should've arrived after the 1015th update
-          updateJ(jsonAdd(sdoc("id", "B2", "_version_", "1015")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
-          updateJ(jsonAdd(sdoc("id", "B3", "_version_", "1020")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
+          updateJ(jsonAdd(sdoc("id", "RDBQ1_1", "_version_", "1010")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
+          updateJ(jsonDelQ("id:RDBQ1_2"), params(DISTRIB_UPDATE_PARAM, FROM_LEADER, "_version_",
"-1017")); // This should've arrived after the 1015th update
+          updateJ(jsonAdd(sdoc("id", "RDBQ1_2", "_version_", "1015")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
+          updateJ(jsonAdd(sdoc("id", "RDBQ1_3", "_version_", "1020")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
         },
         () -> assertJQ(req("q", "*:*"), "/response/numFound==2")
     );
@@ -305,15 +305,15 @@ public class TestRecovery extends SolrTestCaseJ4 {
   public void testLogReplayWithReorderedDBQByAsterixAndChildDocs() throws Exception {
     testLogReplayWithReorderedDBQWrapper(() -> {
           // 1010 - will be deleted
-          updateJ(jsonAdd(sdocWithChildren("B1", "1010")), params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ2_1", "1010")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
           // 1018 - should be kept, including child docs
-          updateJ(jsonAdd(sdocWithChildren("B2", "1018")), params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ2_2", "1018")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
           // 1017 - delete should affect only 1010
-          updateJ(jsonDelQ("id:*"), params(DISTRIB_UPDATE_PARAM, FROM_LEADER, "_version_",
"-1017")); // This should've arrived after the 1015th update
+          updateJ(jsonDelQ("_root_:RDBQ2_1 _root_:RDBQ2_2 id:RDBQ2_3 _root_:RDBQ2_4"), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER, "_version_", "-1017")); // This should've arrived after the 1015th update
           // 1012 - will be deleted
-          updateJ(jsonAdd(sdoc("id", "B3", "_version_", "1012")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
+          updateJ(jsonAdd(sdoc("id", "RDBQ2_3", "_version_", "1012")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
           // 1020 - should be untouched
-          updateJ(jsonAdd(sdocWithChildren("B4", "1020")), params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ2_4", "1020")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
         },
         () -> assertJQ(req("q", "*:*"), "/response/numFound==6")
     );
@@ -323,29 +323,29 @@ public class TestRecovery extends SolrTestCaseJ4 {
   public void testLogReplayWithReorderedDBQByIdAndChildDocs() throws Exception {
     testLogReplayWithReorderedDBQWrapper(() -> {
           // 1010 - will be deleted
-          updateJ(jsonAdd(sdocWithChildren("B1", "1010")), params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ3_1", "1010")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
           // 1018 - should be kept, including child docs
-          updateJ(jsonAdd(sdocWithChildren("B2", "1018")), params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ3_2", "1018")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
           // 1017 - delete should affect only 1010
-          updateJ(jsonDelQ("id:B1 id:B2 id:B3 id:B4"), params(DISTRIB_UPDATE_PARAM, FROM_LEADER,
"_version_", "-1017")); // This should've arrived after the 1015th update
+          updateJ(jsonDelQ("id:RDBQ3_1 id:RDBQ3_2 id:RDBQ3_3 id:RDBQ3_4"), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER, "_version_", "-1017")); // This should've arrived after the 1015th update
           // 1012 - will be deleted
-          updateJ(jsonAdd(sdoc("id", "B3", "_version_", "1012")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
+          updateJ(jsonAdd(sdoc("id", "RDBQ3_3", "_version_", "1012")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
           // 1020 - should be untouched
-          updateJ(jsonAdd(sdocWithChildren("B4", "1020")), params(DISTRIB_UPDATE_PARAM, FROM_LEADER));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ3_4", "1020")), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
         },
-        () -> assertJQ(req("q", "*:*"), "/response/numFound==8") // B2, B4 and 6 children
docs (delete by id does not delete child docs)
+        () -> assertJQ(req("q", "*:*"), "/response/numFound==8") // RDBQ3_2, RDBQ3_4 and
6 children docs (delete by id does not delete child docs)
     );
   }
 
   @Test
   public void testLogReplayWithReorderedDBQInsertingChildnodes() throws Exception {
     testLogReplayWithReorderedDBQWrapper(() -> {
-          updateJ(jsonDelQ("id:B2"), params(DISTRIB_UPDATE_PARAM, FROM_LEADER, "_version_",
"-1017"));
+          updateJ(jsonDelQ("id:RDBQ4_2"), params(DISTRIB_UPDATE_PARAM, FROM_LEADER, "_version_",
"-1017"));
           // test doc: B1
           // 1013 - will be inserted with 3 children
-          updateJ(jsonAdd(sdocWithChildren("B1", "1013", 3)), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ4_1", "1013", 3)), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
         },
-        () -> assertJQ(req("q", "*:*"), "/response/numFound==4") // B1 and B2, plus 2x
3 children
+        () -> assertJQ(req("q", "*:*"), "/response/numFound==4") // RDBQ4_1 and RDBQ4_2,
plus 2x 3 children
     );
   }
 
@@ -355,17 +355,17 @@ public class TestRecovery extends SolrTestCaseJ4 {
     testLogReplayWithReorderedDBQWrapper(() -> {
           // control
           // 1013 - will be inserted with 3 children
-          updateJ(jsonAdd(sdocWithChildren("B1", "1011", 2)), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ5_1", "1011", 2)), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
           // 1018 - this should be the final
-          updateJ(jsonAdd(sdocWithChildren("B1", "1012", 3)), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ5_1", "1012", 3)), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
 
           // 1013 - will be inserted with 3 children
-          updateJ(jsonAdd(sdocWithChildren("B2", "1013", 2)), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
-          updateJ(jsonDelQ("id:B3"), params(DISTRIB_UPDATE_PARAM, FROM_LEADER, "_version_",
"-1019"));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ5_2", "1013", 2)), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
+          updateJ(jsonDelQ("id:RDBQ5_3"), params(DISTRIB_UPDATE_PARAM, FROM_LEADER, "_version_",
"-1019"));
           // 1018 - this should be the final
-          updateJ(jsonAdd(sdocWithChildren("B2", "1018", 3)), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
+          updateJ(jsonAdd(sdocWithChildren("RDBQ5_2", "1018", 3)), params(DISTRIB_UPDATE_PARAM,
FROM_LEADER));
         },
-        () -> assertJQ(req("q", "*:*"), "/response/numFound==8") // B1+3children+B2+3children
+        () -> assertJQ(req("q", "*:*"), "/response/numFound==8") // RDBQ5_1+3children+RDBQ5_2+3children
     );
   }
 


Mime
View raw message