Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The meat of HealthCheckHandlerTest.testHealthCheckHandler() currently looks like this...
while (live_nodes.size() == 1 && counter++ < 100) { Thread.sleep(100); live_nodes = cluster.getSolrClient().getZkStateReader().getClusterState().getLiveNodes(); } try { req.process(httpSolrClient); } catch (HttpSolrClient.RemoteSolrException e) { assertTrue(e.getMessage(), e.getMessage().contains("Host Unavailable")); assertEquals(SolrException.ErrorCode.SERVICE_UNAVAILABLE.code, e.code()); }
- nothing actually asserts that live_nodes.size() != 1 – so the loop could just exit after 100 iterations w/o any changes to hte system happening.
- instead of using expectThrows, the only assertions are inside the catch block – if the code (unexpectedly) succeeds the test will not fail (false positive)
Attachments
Attachments
Issue Links
- incorporates
-
SOLR-11457 HealthCheckHandlerTest.testHealthCheckHandlerSolrJ() non-reproducible failures -- test order/timing realted?
- Closed
- is fixed by
-
SOLR-14191 Restore fixes for HealthCheckHandlerTest.testHealthCheckHandler() made by SOLR-11456
- Closed
- is related to
-
SOLR-11457 HealthCheckHandlerTest.testHealthCheckHandlerSolrJ() non-reproducible failures -- test order/timing realted?
- Closed
- relates to
-
SOLR-11126 Node-level health check handler
- Closed