dsmiley commented on code in PR #2884: URL: https://github.com/apache/solr/pull/2884#discussion_r1855506131
########## solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttp2SolrClientIntegrationTest.java: ########## @@ -262,6 +214,31 @@ private LBSolrClient.Endpoint[] bootstrapBaseSolrEndpoints(int max) { return solrUrls; } + private void startJettyAndWaitForAliveCheckQuery(SolrInstance solrInstance) throws Exception { + final int pollIntervalMs = 50; + final int timeoutMs = 10000; + int waitSoFarMs = 0; + + try (LogListener logListener = LogListener.info().substring("distrib=false")) { + solrInstance.startJetty(); + while (true) { + if (logListener.pollMessage() != null) { Review Comment: If we tweak LogListener to use the BlockingQueue semantics of the underlying BlockingQueue, you could poll with a timeout, and thus wait *just* long enough and not longer. In other words, expose a new pollMessage(time,timeUnit) method and then no need for this loop & interrupt & sleep. I could imagine more tests using this technique. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org