Merge pull request #2151 from navis/fix-testfail-xxServerViewTests

Another try to fix xxServerViewTests
This commit is contained in:
Fangjin Yang 2015-12-23 20:51:01 -08:00
commit 2aee353f17
14 changed files with 18 additions and 0 deletions

View File

@ -99,6 +99,7 @@ public class RemoteTaskRunnerTest
.compressionProvider(new PotentiallyGzippedCompressionProvider(false))
.build();
cf.start();
cf.blockUntilConnected();
cf.create().creatingParentsIfNeeded().forPath(basePath);
cf.create().creatingParentsIfNeeded().forPath(tasksPath);

View File

@ -146,6 +146,7 @@ public class OverlordResourceTest
IndexerZkConfig indexerZkConfig = new IndexerZkConfig(new ZkPathsConfig(), null, null, null, null, null);
setupServerAndCurator();
curator.start();
curator.blockUntilConnected();
curator.create().creatingParentsIfNeeded().forPath(indexerZkConfig.getLeaderLatchPath());
druidNode = new DruidNode("hey", "what", 1234);
ServiceEmitter serviceEmitter = new NoopServiceEmitter();

View File

@ -102,6 +102,7 @@ public class WorkerTaskMonitorTest
.compressionProvider(new PotentiallyGzippedCompressionProvider(false))
.build();
cf.start();
cf.blockUntilConnected();
cf.create().creatingParentsIfNeeded().forPath(basePath);
worker = new Worker(

View File

@ -66,6 +66,7 @@ public class WorkerResourceTest
.compressionProvider(new PotentiallyGzippedCompressionProvider(false))
.build();
cf.start();
cf.blockUntilConnected();
cf.create().creatingParentsIfNeeded().forPath(basePath);
worker = new Worker(

View File

@ -81,6 +81,7 @@ public class BrokerServerViewTest extends CuratorTestBase
{
setupServerAndCurator();
curator.start();
curator.blockUntilConnected();
}
@Test

View File

@ -73,6 +73,7 @@ public class CoordinatorServerViewTest extends CuratorTestBase
{
setupServerAndCurator();
curator.start();
curator.blockUntilConnected();
}
@Test

View File

@ -96,6 +96,7 @@ public class BatchServerInventoryViewTest
.compressionProvider(new PotentiallyGzippedCompressionProvider(true))
.build();
cf.start();
cf.blockUntilConnected();
cf.create().creatingParentsIfNeeded().forPath(testBasePath);
jsonMapper = new DefaultObjectMapper();

View File

@ -184,6 +184,7 @@ public class AnnouncerTest extends CuratorTestBase
public void testCleansUpItsLittleTurdlings() throws Exception
{
curator.start();
curator.blockUntilConnected();
Announcer announcer = new Announcer(curator, exec);
final byte[] billy = "billy".getBytes();
@ -209,6 +210,7 @@ public class AnnouncerTest extends CuratorTestBase
public void testLeavesBehindTurdlingsThatAlreadyExisted() throws Exception
{
curator.start();
curator.blockUntilConnected();
Announcer announcer = new Announcer(curator, exec);
final byte[] billy = "billy".getBytes();
@ -237,6 +239,7 @@ public class AnnouncerTest extends CuratorTestBase
public void testLeavesBehindTurdlingsWhenToldTo() throws Exception
{
curator.start();
curator.blockUntilConnected();
Announcer announcer = new Announcer(curator, exec);
final byte[] billy = "billy".getBytes();

View File

@ -46,6 +46,7 @@ public class ServiceAnnouncerTest extends CuratorTestBase
public void testServiceAnnouncement() throws Exception
{
curator.start();
curator.blockUntilConnected();
List<String> serviceNames = ImmutableList.of(
"druid/overlord",
"druid/coordinator",
@ -79,6 +80,7 @@ public class ServiceAnnouncerTest extends CuratorTestBase
public void testServiceAnnouncementFail() throws Exception
{
curator.start();
curator.blockUntilConnected();
createAndAnnounceServices(ImmutableList.of("placeholder/\u0001"));
}

View File

@ -66,6 +66,8 @@ public class CuratorInventoryManagerTest extends io.druid.curator.CuratorTestBas
);
curator.start();
curator.blockUntilConnected();
manager.start();
Assert.assertTrue(Iterables.isEmpty(manager.getInventory()));

View File

@ -79,6 +79,7 @@ public class ZkCoordinatorTest extends CuratorTestBase
{
setupServerAndCurator();
curator.start();
curator.blockUntilConnected();
try {
infoDir = new File(File.createTempFile("blah", "blah2").getParent(), "ZkCoordinatorTest");
infoDir.mkdirs();

View File

@ -76,6 +76,7 @@ public class BatchDataSegmentAnnouncerTest
.compressionProvider(new PotentiallyGzippedCompressionProvider(false))
.build();
cf.start();
cf.blockUntilConnected();
cf.create().creatingParentsIfNeeded().forPath(testBasePath);
jsonMapper = new DefaultObjectMapper();

View File

@ -112,6 +112,7 @@ public class DruidCoordinatorTest extends CuratorTestBase
EasyMock.replay(configManager);
setupServerAndCurator();
curator.start();
curator.blockUntilConnected();
curator.create().creatingParentsIfNeeded().forPath(LOADPATH);
objectMapper = new DefaultObjectMapper();
druidCoordinatorConfig = new TestDruidCoordinatorConfig(new Duration(COORDINATOR_START_DELAY), new Duration(COORDINATOR_PERIOD), null, null, null, false, false);

View File

@ -64,6 +64,7 @@ public class LoadQueuePeonTest extends CuratorTestBase
{
setupServerAndCurator();
curator.start();
curator.blockUntilConnected();
curator.create().creatingParentsIfNeeded().forPath(LOAD_QUEUE_PATH);
loadQueueCache = new PathChildrenCache(