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);
SCMClientProtocolServer clientProtocolServer = cluster
.getStorageContainerManager().getClientProtocolServer();
assertFalse((scm.getClientProtocolServer()).getChillModeStatus());
final List<ContainerInfo> containers = scm.getScmContainerManager()
.getStateManager().getAllContainers();
scm.getEventQueue().fireEvent(SCMEvents.CHILL_MODE_STATUS, true);
assertFalse((scm.getClientProtocolServer()).getChillModeStatus());
GenericTestUtils.waitFor(() -> {
return clientProtocolServer.getChillModeStatus();
}, 50, 1000 * 5);