/* This is a lame test, we should really be testing something like
    z-score or make sure that we don't have 3sigma kind of events. Too lazy
    to write all that code. This test very lamely tests if we have more than
    5 separate nodes  from the list of 10 datanodes that got allocated a
    container.
     */
@Test
  public void testallocateContainerDistributesAllocation() throws Exception {
    /* This is a lame test, we should really be testing something like
    z-score or make sure that we don't have 3sigma kind of events. Too lazy
    to write all that code. This test very lamely tests if we have more than
    5 separate nodes  from the list of 10 datanodes that got allocated a
    container.
     */
    Set<UUID> pipelineList = new TreeSet<>();
    for (int x = 0; x < 30; x++) {
      ContainerInfo containerInfo = containerManager.allocateContainer(
          replicationType, replicationFactor, OzoneConsts.OZONE);
      Assert.assertNotNull(containerInfo);
      Assert.assertNotNull(containerInfo.getPipelineID());
      pipelineList.add(pipelineManager.getPipeline(
          containerInfo.getPipelineID()).getFirstNode()
          .getUuid());
    }
    Assert.assertTrue(pipelineList.size() >= 1);
  }
@Test
public void testallocateContainerDistributesAllocation() throws Exception {
/* This is a lame test, we should really be testing something like
z-score or make sure that we don't have 3sigma kind of events. Too lazy
to write all that code. This test very lamely tests if we have more than
5 separate nodes from the list of 10 datanodes that got allocated a
container.
*/
Set<UUID> pipelineList = new TreeSet<>();
for (int x = 0; x < 30; x++) {
@Test
public void testallocateContainerDistributesAllocation() throws Exception {
/* This is a lame test, we should really be testing something like
z-score or make sure that we don't have 3sigma kind of events. Too lazy
to write all that code. This test very lamely tests if we have more than
5 separate nodes from the list of 10 datanodes that got allocated a
container.
*/
Set<UUID> pipelineList = new TreeSet<>();
for (int x = 0; x < 30; x++) {
ContainerInfo containerInfo = containerManager.allocateContainer(
replicationType, replicationFactor, OzoneConsts.OZONE);
Assert.assertNotNull(containerInfo);
Assert.assertNotNull(containerInfo.getPipelineID());
pipelineList.add(pipelineManager.getPipeline(
containerInfo.getPipelineID()).getFirstNode()
.getUuid());
}
@Test
public void testallocateContainerDistributesAllocation() throws Exception {
/* This is a lame test, we should really be testing something like
z-score or make sure that we don't have 3sigma kind of events. Too lazy
to write all that code. This test very lamely tests if we have more than
5 separate nodes from the list of 10 datanodes that got allocated a
container.
*/
Set<UUID> pipelineList = new TreeSet<>();
for (int x = 0; x < 30; x++) {
ContainerInfo containerInfo = containerManager.allocateContainer(
replicationType, replicationFactor, OzoneConsts.OZONE);
Assert.assertNotNull(containerInfo);
Assert.assertNotNull(containerInfo.getPipelineID());
pipelineList.add(pipelineManager.getPipeline(
containerInfo.getPipelineID()).getFirstNode()
.getUuid());
}
Assert.assertTrue(pipelineList.size() >= 1);
}