lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject lucene-solr:jira/solr-11285: SOLR-11285: Fix test failures.
Date Thu, 12 Oct 2017 18:55:47 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/jira/solr-11285 6b2b637f8 -> 2b34fa471


SOLR-11285: Fix test failures.


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

Branch: refs/heads/jira/solr-11285
Commit: 2b34fa47110548707447a7c0eec424fb05b7b532
Parents: 6b2b637
Author: Andrzej Bialecki <ab@apache.org>
Authored: Thu Oct 12 20:55:21 2017 +0200
Committer: Andrzej Bialecki <ab@apache.org>
Committed: Thu Oct 12 20:55:21 2017 +0200

----------------------------------------------------------------------
 .../org/apache/solr/cloud/ZkDistributedQueue.java  |  4 ----
 .../OverseerCollectionConfigSetProcessorTest.java  | 17 +++++++++--------
 2 files changed, 9 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2b34fa47/solr/core/src/java/org/apache/solr/cloud/ZkDistributedQueue.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkDistributedQueue.java b/solr/core/src/java/org/apache/solr/cloud/ZkDistributedQueue.java
index 7ac661c..f8de53b 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkDistributedQueue.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkDistributedQueue.java
@@ -391,12 +391,8 @@ public class ZkDistributedQueue implements DistributedQueue {
   /**
    * Return the currently-known set of elements, using child names from memory. If no children
are found, or no
    * children pass {@code acceptFilter}, waits up to {@code waitMillis} for at least one
child to become available.
-<<<<<<< HEAD:solr/core/src/java/org/apache/solr/cloud/ZkDistributedQueue.java
    * <p>
    * Package-private to support {@link OverseerTaskQueue} specifically.</p>
-=======
-   * Package-private to support {@link OverseerTaskQueue} specifically.
->>>>>>> master:solr/core/src/java/org/apache/solr/cloud/ZkDistributedQueue.java
    */
   @Override
   public Collection<Pair<String, byte[]>> peekElements(int max, long waitMillis,
Predicate<String> acceptFilter) throws KeeperException, InterruptedException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2b34fa47/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
b/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
index d739f37..4db3055 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
@@ -51,6 +51,7 @@ import org.apache.solr.handler.component.ShardHandlerFactory;
 import org.apache.solr.handler.component.ShardRequest;
 import org.apache.solr.util.TimeOut;
 import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.data.Stat;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -327,14 +328,14 @@ public class OverseerCollectionConfigSetProcessorTest extends SolrTestCaseJ4
{
     }).when(stateManagerMock).setData(anyString(), any(byte[].class), anyInt());
     when(stateManagerMock.getData(anyString(), any())).thenAnswer(invocation -> zkMap.get(invocation.getArgument(0)));
 
-//    when(solrZkClientMock.exists(any(String.class), isNull(), anyBoolean())).thenAnswer(invocation
-> {
-//      String key = invocation.getArgument(0);
-//      if (zkMap.containsKey(key)) {
-//        return new Stat();
-//      } else {
-//        return null;
-//      }
-//    });
+    when(solrZkClientMock.exists(any(String.class), isNull(), anyBoolean())).thenAnswer(invocation
-> {
+      String key = invocation.getArgument(0);
+      if (zkMap.containsKey(key)) {
+        return new Stat();
+      } else {
+        return null;
+      }
+    });
 
     zkMap.put("/configs/myconfig", null);
     


Mime
View raw message