You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2019/07/22 15:33:16 UTC
[lucene-solr] branch master updated: SOLR-13637: addressing test
failures
This is an automated email from the ASF dual-hosted git repository.
noble pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new 2ef0ba3 SOLR-13637: addressing test failures
2ef0ba3 is described below
commit 2ef0ba3dceec342c9754d2e44f943e5b8d61b89f
Author: noble <no...@apache.org>
AuthorDate: Mon Jul 22 08:31:56 2019 -0700
SOLR-13637: addressing test failures
---
.../solr/handler/TestContainerReqHandler.java | 41 +++++++++++-----------
1 file changed, 20 insertions(+), 21 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/handler/TestContainerReqHandler.java b/solr/core/src/test/org/apache/solr/handler/TestContainerReqHandler.java
index 34656d8..0a924a1 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestContainerReqHandler.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestContainerReqHandler.java
@@ -85,31 +85,30 @@ public class TestContainerReqHandler extends SolrCloudTestCase {
if (i > 0) {
Thread.sleep(100);
}
+ SolrResponse rsp = null;
try {
- SolrResponse rsp = req.process(client);
- try {
- for (Object e : vals.entrySet()) {
- Map.Entry entry = (Map.Entry) e;
- String key = (String) entry.getKey();
- Object val = entry.getValue();
- Predicate p = val instanceof Predicate ? (Predicate) val : o -> {
- String v = o == null ? null : String.valueOf(o);
- return Objects.equals(val, o);
- };
- assertTrue("attempt: " + i + " Mismatch for value : '" + key + "' in response " + Utils.toJSONString(rsp),
- p.test(rsp.getResponse()._get(key, null)));
-
- }
- return;
- } catch (Exception e) {
- if (i >= repeats - 1) throw e;
- continue;
- }
-
+ rsp = req.process(client);
} catch (Exception e) {
if (i >= repeats - 1) throw e;
- continue;
}
+ for (Object e : vals.entrySet()) {
+ Map.Entry entry = (Map.Entry) e;
+ String key = (String) entry.getKey();
+ Object val = entry.getValue();
+ Predicate p = val instanceof Predicate ? (Predicate) val : o -> {
+ String v = o == null ? null : String.valueOf(o);
+ return Objects.equals(val, o);
+ };
+ boolean isPass = p.test(rsp.getResponse()._get(key, null));
+ if (!isPass && i >= repeats - 1) {
+ assertTrue("attempt: " + i + " Mismatch for value : '" + key + "' in response " + Utils.toJSONString(rsp),
+ isPass);
+ }
+
+ }
+ return;
+
+
}