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 2021/02/21 16:27:48 UTC
[lucene-solr] branch reference_impl_dev updated: @1368 Test
hardening.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/reference_impl_dev by this push:
new 9b2345e @1368 Test hardening.
9b2345e is described below
commit 9b2345e6edef9bd4a76d9d079df666cd285fc64d
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Sun Feb 21 10:27:27 2021 -0600
@1368 Test hardening.
Took 9 minutes
---
.../solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java | 5 ++++-
solr/test-framework/src/java/org/apache/solr/SolrTestCase.java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java
index c13b812..26f1bdf 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java
@@ -25,6 +25,7 @@ import java.util.Optional;
import org.apache.solr.SolrTestCase;
import org.apache.lucene.util.TestUtil;
+import org.apache.solr.client.solrj.SolrClient;
import org.junit.Test;
public class CloudSolrClientMultiConstructorTest extends SolrTestCase {
@@ -105,6 +106,8 @@ public class CloudSolrClientMultiConstructorTest extends SolrTestCase {
public void testBadChroot() throws IOException {
final List<String> zkHosts = new ArrayList<>();
zkHosts.add("host1:2181");
- new CloudSolrClient.Builder(zkHosts, Optional.of("foo")).build().close();
+ try (SolrClient client = new CloudSolrClient.Builder(zkHosts, Optional.of("foo")).build()) {
+
+ }
}
}
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
index b193295..8f557c7 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
@@ -702,7 +702,7 @@ public class SolrTestCase extends Assert {
thread.interrupt();
return true;
}
- if (thread.getName().contains(ParWork.ROOT_EXEC_NAME + "-")) {
+ if (thread.getName().contains(ParWork.ROOT_EXEC_NAME + "-") || thread.getName().contains("ParWork-")) {
log.warn("interrupt on {}", thread.getName());
try {
thread.join(250);