mirror of https://github.com/apache/druid.git
try to make DruidCoordinatorTest deterministic (#2967)
This commit is contained in:
parent
a9b721a01b
commit
681ffdb417
|
@ -100,6 +100,7 @@ public class DruidCoordinatorTest extends CuratorTestBase
|
|||
@Before
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
taskMaster = EasyMock.createMock(LoadQueueTaskMaster.class);
|
||||
druidServer = EasyMock.createMock(DruidServer.class);
|
||||
serverInventoryView = EasyMock.createMock(SingleServerInventoryView.class);
|
||||
databaseSegmentManager = EasyMock.createNiceMock(MetadataSegmentManager.class);
|
||||
|
@ -371,7 +372,9 @@ public class DruidCoordinatorTest extends CuratorTestBase
|
|||
Assert.assertNotNull(dataSourceMap.get(dataSource));
|
||||
// Simulated the adding of segment to druidServer during SegmentChangeRequestLoad event
|
||||
// The load rules asks for 2 replicas, therefore 1 replica should still be pending
|
||||
Assert.assertEquals(1L, dataSourceMap.get(dataSource).get());
|
||||
while(dataSourceMap.get(dataSource).get() != 1L) {
|
||||
Thread.sleep(50);
|
||||
}
|
||||
|
||||
coordinator.stop();
|
||||
leaderUnannouncerLatch.await();
|
||||
|
|
Loading…
Reference in New Issue