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 2017/02/22 16:14:00 UTC

[1/2] lucene-solr:branch_6x: SOLR-10101: BadApple test method.

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 87a9dbc35 -> e905316be


SOLR-10101: BadApple test method.


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

Branch: refs/heads/branch_6x
Commit: eb71a6eec1588a8c5a19e1f37aca4406dc267898
Parents: 87a9dbc
Author: markrmiller <ma...@apache.org>
Authored: Mon Feb 6 23:01:49 2017 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Wed Feb 22 11:12:58 2017 -0500

----------------------------------------------------------------------
 solr/core/src/test/org/apache/solr/core/TestLazyCores.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/eb71a6ee/solr/core/src/test/org/apache/solr/core/TestLazyCores.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/TestLazyCores.java b/solr/core/src/test/org/apache/solr/core/TestLazyCores.java
index 385b9c5..0c0845b 100644
--- a/solr/core/src/test/org/apache/solr/core/TestLazyCores.java
+++ b/solr/core/src/test/org/apache/solr/core/TestLazyCores.java
@@ -729,6 +729,7 @@ public class TestLazyCores extends SolrTestCaseJ4 {
     }
   }
 
+  @BadApple(bugUrl = "https://issues.apache.org/jira/browse/SOLR-10101")
   // Insure that when a core is aged out of the transient cache, any uncommitted docs are preserved.
   // Note, this needs FS-based indexes to persist!
   // Cores 2, 3, 6, 7, 8, 9 are transient


[2/2] lucene-solr:branch_6x: SOLR-10065: The Nightly test ConcurrentDeleteAndCreateCollectionTest appears to be too fragile.

Posted by ma...@apache.org.
SOLR-10065: The Nightly test ConcurrentDeleteAndCreateCollectionTest appears to be too fragile.


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

Branch: refs/heads/branch_6x
Commit: e905316be35964e55b3a967123d6260041ae8116
Parents: eb71a6e
Author: markrmiller <ma...@apache.org>
Authored: Wed Feb 1 08:58:32 2017 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Wed Feb 22 11:13:46 2017 -0500

----------------------------------------------------------------------
 ...ConcurrentDeleteAndCreateCollectionTest.java | 33 +++++++++++++-------
 1 file changed, 21 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e905316b/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java b/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java
index 3e90759..151230d 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java
@@ -17,6 +17,7 @@
 package org.apache.solr.cloud;
 
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.nio.file.Path;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
@@ -27,14 +28,19 @@ import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.client.solrj.response.CollectionAdminResponse;
+import org.apache.solr.common.util.IOUtils;
 import org.apache.solr.util.TimeOut;
 import org.apache.zookeeper.KeeperException;
 import org.junit.After;
 import org.junit.Before;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @Nightly
 public class ConcurrentDeleteAndCreateCollectionTest extends SolrTestCaseJ4 {
   
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+  
   private MiniSolrCloudCluster solrCluster;
   
   @Override
@@ -54,7 +60,7 @@ public class ConcurrentDeleteAndCreateCollectionTest extends SolrTestCaseJ4 {
   public void testConcurrentCreateAndDeleteDoesNotFail() {
     final AtomicReference<Exception> failure = new AtomicReference<>();
     final int timeToRunSec = 30;
-    final Thread[] threads = new Thread[10];
+    final CreateDeleteCollectionThread[] threads = new CreateDeleteCollectionThread[10];
     for (int i = 0; i < threads.length; i++) {
       final String collectionName = "collection" + i;
       uploadConfig(configset("configset-2"), collectionName);
@@ -74,12 +80,12 @@ public class ConcurrentDeleteAndCreateCollectionTest extends SolrTestCaseJ4 {
     final String configName = "testconfig";
     uploadConfig(configset("configset-2"), configName); // upload config once, to be used by all collections
     final String baseUrl = solrCluster.getJettySolrRunners().get(0).getBaseUrl().toString();
-    final SolrClient solrClient = getHttpSolrClient(baseUrl);
     final AtomicReference<Exception> failure = new AtomicReference<>();
     final int timeToRunSec = 30;
-    final Thread[] threads = new Thread[2];
+    final CreateDeleteCollectionThread[] threads = new CreateDeleteCollectionThread[2];
     for (int i = 0; i < threads.length; i++) {
       final String collectionName = "collection" + i;
+      final SolrClient solrClient = getHttpSolrClient(baseUrl);
       threads[i] = new CreateDeleteCollectionThread("create-delete-" + i, collectionName, configName,
                                                     timeToRunSec, solrClient, failure);
     }
@@ -88,12 +94,6 @@ public class ConcurrentDeleteAndCreateCollectionTest extends SolrTestCaseJ4 {
     joinAll(threads);
 
     assertNull("concurrent create and delete collection failed: " + failure.get(), failure.get());
-
-    try {
-      solrClient.close();
-    } catch (IOException e) {
-      throw new RuntimeException(e);
-    }
   }
   
   private void uploadConfig(Path configDir, String configName) {
@@ -104,10 +104,10 @@ public class ConcurrentDeleteAndCreateCollectionTest extends SolrTestCaseJ4 {
     }
   }
   
-  private void joinAll(final Thread[] threads) {
-    for (Thread t : threads) {
+  private void joinAll(final CreateDeleteCollectionThread[] threads) {
+    for (CreateDeleteCollectionThread t : threads) {
       try {
-        t.join();
+        t.joinAndClose();
       } catch (InterruptedException e) {
         Thread.interrupted();
         throw new RuntimeException(e);
@@ -152,6 +152,7 @@ public class ConcurrentDeleteAndCreateCollectionTest extends SolrTestCaseJ4 {
     }
     
     protected void addFailure(Exception e) {
+      log.error("Add Failure", e);
       synchronized (failure) {
         if (failure.get() != null) {
           failure.get().addSuppressed(e);
@@ -190,6 +191,14 @@ public class ConcurrentDeleteAndCreateCollectionTest extends SolrTestCaseJ4 {
         addFailure(e);
       }
     }
+    
+    public void joinAndClose() throws InterruptedException {
+      try {
+        super.join(60000);
+      } finally {
+        IOUtils.closeQuietly(solrClient);
+      }
+    }
   }
   
   private static class CreateDeleteSearchCollectionThread extends CreateDeleteCollectionThread {