YARN-942. TestContainerSchedulerQueuing.testKillOnlyRequiredOpportunisticContainers fails sporadically Contributed by Ahmed Hussein (ahussein)
(cherry picked from commit ede05b19d1
)
This commit is contained in:
parent
74fa55afc3
commit
153eac1d21
|
@ -978,16 +978,14 @@ public class TestContainerSchedulerQueuing extends BaseContainerManagerTest {
|
||||||
allRequests = StartContainersRequest.newInstance(list);
|
allRequests = StartContainersRequest.newInstance(list);
|
||||||
containerManager.startContainers(allRequests);
|
containerManager.startContainers(allRequests);
|
||||||
|
|
||||||
BaseContainerManagerTest.waitForNMContainerState(containerManager,
|
|
||||||
createContainerId(0), ContainerState.DONE, 40);
|
|
||||||
Thread.sleep(5000);
|
|
||||||
|
|
||||||
// Get container statuses. Container 0 should be killed, container 1
|
// Get container statuses. Container 0 should be killed, container 1
|
||||||
// should be queued and container 2 should be running.
|
// should be queued and container 2 should be running.
|
||||||
int killedContainers = 0;
|
int killedContainers = 0;
|
||||||
List<ContainerId> statList = new ArrayList<ContainerId>();
|
List<ContainerId> statList = new ArrayList<ContainerId>();
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
statList.add(createContainerId(i));
|
statList.add(createContainerId(i));
|
||||||
|
BaseContainerManagerTest.waitForNMContainerState(containerManager,
|
||||||
|
statList.get(i), ContainerState.DONE, 40);
|
||||||
}
|
}
|
||||||
GetContainerStatusesRequest statRequest =
|
GetContainerStatusesRequest statRequest =
|
||||||
GetContainerStatusesRequest.newInstance(statList);
|
GetContainerStatusesRequest.newInstance(statList);
|
||||||
|
|
Loading…
Reference in New Issue