add a long leader wait at the start of this test for slow/busy comps

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1296646 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-03-03 15:48:34 +00:00
parent 30a67e8005
commit e9c9011737
1 changed files with 5 additions and 0 deletions

View File

@ -46,9 +46,13 @@ public class BasicZkTest extends AbstractZkTestCase {
@Test @Test
public void testBasic() throws Exception { public void testBasic() throws Exception {
// test using ZooKeeper // test using ZooKeeper
assertTrue("Not using ZooKeeper", h.getCoreContainer().isZooKeeperAware()); assertTrue("Not using ZooKeeper", h.getCoreContainer().isZooKeeperAware());
// for the really slow/busy computer, we wait to make sure we have a leader before starting
h.getCoreContainer().getZkController().getZkStateReader().getLeaderUrl("collection1", "shard1", 30000);
ZkController zkController = h.getCoreContainer().getZkController(); ZkController zkController = h.getCoreContainer().getZkController();
// test merge factor picked up // test merge factor picked up
@ -154,6 +158,7 @@ public class BasicZkTest extends AbstractZkTestCase {
} }
zkController.getZkClient().printLayoutToStdOut();
} }
public SolrQueryRequest request(String... q) { public SolrQueryRequest request(String... q) {