HDDS-509. TestStorageContainerManager is flaky.

Contributed by Xiaoyu Yao and Ajay Kumar.
This commit is contained in:
Anu Engineer 2018-09-19 12:57:44 -07:00
parent 090272d7de
commit 98c9bc4aa0

View File

@ -588,11 +588,10 @@ public void testSCMChillModeRestrictedOp() throws Exception {
helper.createKeys(10, 4096); helper.createKeys(10, 4096);
SCMClientProtocolServer clientProtocolServer = cluster SCMClientProtocolServer clientProtocolServer = cluster
.getStorageContainerManager().getClientProtocolServer(); .getStorageContainerManager().getClientProtocolServer();
assertFalse((scm.getClientProtocolServer()).getChillModeStatus());
final List<ContainerInfo> containers = scm.getScmContainerManager() final List<ContainerInfo> containers = scm.getScmContainerManager()
.getStateManager().getAllContainers(); .getStateManager().getAllContainers();
scm.getEventQueue().fireEvent(SCMEvents.CHILL_MODE_STATUS, true); scm.getEventQueue().fireEvent(SCMEvents.CHILL_MODE_STATUS, true);
assertFalse((scm.getClientProtocolServer()).getChillModeStatus());
GenericTestUtils.waitFor(() -> { GenericTestUtils.waitFor(() -> {
return clientProtocolServer.getChillModeStatus(); return clientProtocolServer.getChillModeStatus();
}, 50, 1000 * 5); }, 50, 1000 * 5);