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

[13/16] lucene-solr:master: SOLR-12801: harden MultiThreadedOCPTest

SOLR-12801: harden MultiThreadedOCPTest


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

Branch: refs/heads/master
Commit: 3f1b75ab82b1924ab124f0e19be4603a7975d70b
Parents: a9a5cdc
Author: markrmiller <ma...@apache.org>
Authored: Sun Dec 9 11:17:24 2018 -0600
Committer: markrmiller <ma...@apache.org>
Committed: Sun Dec 9 18:31:28 2018 -0600

----------------------------------------------------------------------
 .../src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3f1b75ab/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java b/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
index d69b47b..a688897 100644
--- a/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
@@ -75,7 +75,7 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
       DistributedQueue distributedQueue = new ZkDistributedQueue(cloudClient.getZkStateReader().getZkClient(),
           "/overseer/collection-queue-work", new Stats());
       //fill the work queue with blocked tasks by adding more than the no:of parallel tasks
-      for (int i = 0; i < MAX_PARALLEL_TASKS+5; i++) {
+      for (int i = 0; i < MAX_PARALLEL_TASKS + 15; i++) {
         distributedQueue.offer(Utils.toJSON(Utils.makeMap(
             "collection", "A_COLL",
             QUEUE_OPERATION, MOCK_COLL_TASK.toLower(),
@@ -87,7 +87,7 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
         log.info("MOCK task added {}", i);
 
       }
-      Thread.sleep(10);//wait and post the next message
+      Thread.sleep(100);//wait and post the next message
 
       //this is not going to be blocked because it operates on another collection
       distributedQueue.offer(Utils.toJSON(Utils.makeMap(
@@ -99,7 +99,7 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
 
 
       Long acoll = null, bcoll = null;
-      for (int i = 0; i < 100; i++) {
+      for (int i = 0; i < 500; i++) {
         if (bcoll == null) {
           CollectionAdminResponse statusResponse = getStatusResponse("200", client);
           bcoll = (Long) statusResponse.getResponse().get("MOCK_FINISHED");
@@ -112,7 +112,7 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
         Thread.sleep(100);
       }
       assertTrue(acoll != null && bcoll != null);
-      assertTrue(acoll > bcoll);
+      assertTrue("acoll: " + acoll + " bcoll: " + bcoll, acoll > bcoll);
     }
 
   }