SOLR-13637: addressing test failures

This commit is contained in:
noble 2019-07-22 08:31:56 -07:00
parent dd7b3d8d95
commit 2ef0ba3dce
1 changed files with 20 additions and 21 deletions

View File

@ -85,9 +85,12 @@ public class TestContainerReqHandler extends SolrCloudTestCase {
if (i > 0) { if (i > 0) {
Thread.sleep(100); Thread.sleep(100);
} }
SolrResponse rsp = null;
try { try {
SolrResponse rsp = req.process(client); rsp = req.process(client);
try { } catch (Exception e) {
if (i >= repeats - 1) throw e;
}
for (Object e : vals.entrySet()) { for (Object e : vals.entrySet()) {
Map.Entry entry = (Map.Entry) e; Map.Entry entry = (Map.Entry) e;
String key = (String) entry.getKey(); String key = (String) entry.getKey();
@ -96,20 +99,16 @@ public class TestContainerReqHandler extends SolrCloudTestCase {
String v = o == null ? null : String.valueOf(o); String v = o == null ? null : String.valueOf(o);
return Objects.equals(val, 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), assertTrue("attempt: " + i + " Mismatch for value : '" + key + "' in response " + Utils.toJSONString(rsp),
p.test(rsp.getResponse()._get(key, null))); isPass);
}
} }
return; return;
} catch (Exception e) {
if (i >= repeats - 1) throw e;
continue;
}
} catch (Exception e) {
if (i >= repeats - 1) throw e;
continue;
}
} }