mirror of https://github.com/apache/lucene.git
wait until searcher has been registered
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@684284 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
261ebe8a07
commit
d5022251d1
|
@ -86,7 +86,14 @@ public class TestJmxIntegration extends AbstractSolrTestCase {
|
|||
System.err.println("Servers in testJmxUpdate: " + servers);
|
||||
System.err.println(h.getCore().getInfoRegistry());
|
||||
|
||||
ObjectName searcher = getObjectName("searcher", h.getCore().getInfoRegistry().get("searcher"));
|
||||
ObjectName searcher = null;
|
||||
// wait until searcher is registered
|
||||
for (int i=0; i<100; i++) {
|
||||
searcher = getObjectName("searcher", h.getCore().getInfoRegistry().get("searcher"));
|
||||
if (searcher != null) break;
|
||||
Thread.sleep(250);
|
||||
}
|
||||
if (searcher==null) throw new RuntimeException("searcher was never registered");
|
||||
MBeanServer mbeanServer = servers.get(0);
|
||||
System.err.println("Mbeans in server: " + mbeanServer.queryNames(null, null));
|
||||
|
||||
|
|
Loading…
Reference in New Issue