lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject [lucene-solr] branch branch_8x updated: disable TestInjection in TestStressCloudBlindAtomicUpdates
Date Wed, 30 Jan 2019 04:30:23 GMT
This is an automated email from the ASF dual-hosted git repository.

hossman pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 73cfa81  disable TestInjection in TestStressCloudBlindAtomicUpdates
73cfa81 is described below

commit 73cfa810c7fcf8e5299a6b9c2fcecceee44d2846
Author: Chris Hostetter <hossman@apache.org>
AuthorDate: Tue Jan 29 21:23:04 2019 -0700

    disable TestInjection in TestStressCloudBlindAtomicUpdates
    
    work around for SOLR-13189
    
    (cherry picked from commit 0a01b9e12787e56604aab3a0c3792d2aa060ae74)
---
 .../cloud/TestStressCloudBlindAtomicUpdates.java   | 25 ++++++++++++++--------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java
b/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java
index 7c523b1..40b1846 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java
@@ -172,11 +172,15 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase
{
   
   @Before
   private void clearCloudCollection() throws Exception {
+    TestInjection.reset();
+    waitForRecoveriesToFinish(CLOUD_CLIENT);
+    
     assertEquals(0, CLOUD_CLIENT.deleteByQuery("*:*").getStatus());
     assertEquals(0, CLOUD_CLIENT.optimize().getStatus());
-
-    TestInjection.reset();
     
+    assertEquals("Collection should be empty!",
+                 0, CLOUD_CLIENT.query(params("q", "*:*")).getResults().getNumFound());
+
     final int injectionPercentage = (int)Math.ceil(atLeast(1) / 2);
     testInjection = usually() ? "false:0" : ("true:" + injectionPercentage);
   }
@@ -185,17 +189,19 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase
{
    * Assigns {@link #testInjection} to various TestInjection variables.  Calling this 
    * method multiple times in the same method should always result in the same setting being
applied 
    * (even if {@link TestInjection#reset} was called in between.
+   *
+   * NOTE: method is currently a No-Op pending SOLR-13189
    */
   private void startTestInjection() {
-    log.info("TestInjection: fail replica, update pause, tlog pauses: " + testInjection);
-    TestInjection.failReplicaRequests = testInjection;
-    TestInjection.updateLogReplayRandomPause = testInjection;
-    TestInjection.updateRandomPause = testInjection;
+    log.info("TODO: TestInjection disabled pending solution to SOLR-13189");
+    //log.info("TestInjection: fail replica, update pause, tlog pauses: " + testInjection);
+    //TestInjection.failReplicaRequests = testInjection;
+    //TestInjection.updateLogReplayRandomPause = testInjection;
+    //TestInjection.updateRandomPause = testInjection;
   }
 
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
   public void test_dv() throws Exception {
     String field = "long_dv";
     checkExpectedSchemaField(map("name", field,
@@ -206,8 +212,8 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase
{
     
     checkField(field);
   }
+  
   @Test
-// 12-Jun-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
   public void test_dv_stored() throws Exception {
     String field = "long_dv_stored";
     checkExpectedSchemaField(map("name", field,
@@ -229,7 +235,7 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase
{
     
     checkField(field);
   }
-  // commented 4-Sep-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
// added 20-Jul-2018
+
   public void test_dv_idx() throws Exception {
     String field = "long_dv_idx";
     checkExpectedSchemaField(map("name", field,
@@ -473,6 +479,7 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase
{
 
   public static void waitForRecoveriesToFinish(CloudSolrClient client) throws Exception {
     assert null != client.getDefaultCollection();
+    client.getZkStateReader().forceUpdateCollection(client.getDefaultCollection());
     AbstractDistribZkTestBase.waitForRecoveriesToFinish(client.getDefaultCollection(),
                                                         client.getZkStateReader(),
                                                         true, true, 330);


Mime
View raw message