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 2020/07/29 02:02:49 UTC
[lucene-solr] 16/27: @433 Just remove this test method,
we don't need to test fundamental zk.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit cf5b898b1ab4b2f9f9e8bec9a5649510ca5d3ba9
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Jul 28 13:30:42 2020 -0500
@433 Just remove this test method, we don't need to test fundamental zk.
---
.../org/apache/solr/cloud/ZkSolrClientTest.java | 42 ----------------------
1 file changed, 42 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java b/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java
index 30f5639..c099115 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ZkSolrClientTest.java
@@ -225,48 +225,6 @@ public class ZkSolrClientTest extends SolrTestCaseJ4 {
}
}
- public void testWatchChildren() throws Exception {
- try (ZkConnection conn = new ZkConnection ()) {
- final SolrZkClient zkClient = conn.getClient();
- final AtomicInteger cnt = new AtomicInteger();
- final CountDownLatch latch = new CountDownLatch(1);
-
- zkClient.mkdir("/collections");
-
- zkClient.getChildren("/collections", new Watcher() {
-
- @Override
- public void process(WatchedEvent event) {
- if (event.getType().equals(Event.EventType.None)) {
- return;
- }
- cnt.incrementAndGet();
- // remake watch
- try {
- zkClient.getChildren("/collections", this, true);
- latch.countDown();
- } catch (KeeperException | InterruptedException e) {
- throw new RuntimeException(e);
- }
- }
- }, true);
-
- zkClient.mkdir("/collections/collection99");
- zkClient.mkdir("/collections/collection99/shards");
- latch.await(); //wait until watch has been re-created
-
- zkClient.mkdir("/collections/collection99/config=collection1");
-
- zkClient.mkdir("/collections/collection99/config=collection3");
-
- zkClient.mkdir("/collections/collection97");
- zkClient.mkdir("/collections/collection97/shards");
-
- assertEquals(2, cnt.intValue());
-
- }
- }
-
@Override
public void tearDown() throws Exception {
super.tearDown();