From 6520d06ce763c885dc9479370a0cc26612229e46 Mon Sep 17 00:00:00 2001 From: Ishan Chattopadhyaya Date: Tue, 7 Feb 2017 03:40:52 -0800 Subject: [PATCH] SOLR-10079: Test fix for TestInPlaceUpdatesDistrib, using clearIndex() --- .../update/TestInPlaceUpdatesDistrib.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java index 74360e3cb9b..53867218a8a 100644 --- a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java +++ b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java @@ -181,7 +181,7 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase { // The following should work: full update to doc 0, in-place update for doc 0, delete doc 0 private void outOfOrderDBQsTest() throws Exception { - del("*:*"); + clearIndex(); commit(); buildRandomIndex(0); @@ -241,12 +241,12 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase { } log.info("outOfOrderDeleteUpdatesIndividualReplicaTest: This test passed fine..."); - del("*:*"); + clearIndex(); commit(); } private void docValuesUpdateTest() throws Exception { - del("*:*"); + clearIndex(); commit(); // number of docs we're testing (0 <= id), index may contain additional random docs (id < 0) @@ -397,7 +397,7 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase { private void ensureRtgWorksWithPartialUpdatesTest() throws Exception { - del("*:*"); + clearIndex(); commit(); float inplace_updatable_float = 1; @@ -496,7 +496,7 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase { private void outOfOrderUpdatesIndividualReplicaTest() throws Exception { - del("*:*"); + clearIndex(); commit(); buildRandomIndex(0); @@ -561,14 +561,14 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase { } log.info("outOfOrderUpdatesIndividualReplicaTest: This test passed fine..."); - del("*:*"); + clearIndex(); commit(); } // The following should work: full update to doc 0, in-place update for doc 0, delete doc 0 private void outOfOrderDeleteUpdatesIndividualReplicaTest() throws Exception { - del("*:*"); + clearIndex(); commit(); buildRandomIndex(0); @@ -627,7 +627,7 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase { } log.info("outOfOrderDeleteUpdatesIndividualReplicaTest: This test passed fine..."); - del("*:*"); + clearIndex(); commit(); } @@ -641,7 +641,7 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase { DV(id=x, val=5, ver=3) */ private void reorderedDBQsWithInPlaceUpdatesShouldNotThrowReplicaInLIRTest() throws Exception { - del("*:*"); + clearIndex(); commit(); buildRandomIndex(0); @@ -728,12 +728,12 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase { } log.info("reorderedDBQsWithInPlaceUpdatesShouldNotThrowReplicaInLIRTest: This test passed fine..."); - del("*:*"); + clearIndex(); commit(); } private void delayedReorderingFetchesMissingUpdateFromLeaderTest() throws Exception { - del("*:*"); + clearIndex(); commit(); float inplace_updatable_float = 1F; @@ -795,7 +795,7 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase { // This is to ensure that the fetch missing update from leader doesn't bomb out if the // document has been deleted on the leader later on { - del("*:*"); + clearIndex(); commit(); shardToJetty.get(SHARD1).get(1).jetty.getDebugFilter().unsetDelay(); @@ -1038,7 +1038,7 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase { * dbq("inp:14",version=4) */ private void testDBQUsingUpdatedFieldFromDroppedUpdate() throws Exception { - del("*:*"); + clearIndex(); commit(); float inplace_updatable_float = 1F;