Skip to content

Commit 470d49a

Browse files
committed
HDDS-11927 Fix possible flaky
1 parent 2c00c34 commit 470d49a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/balancer/TestContainerBalancerStatusInfo.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ void testGetCurrentStatisticsRequestInPeriodBetweenIterations() throws Exception
9494
config.setMaxSizeToMovePerIteration(50 * OzoneConsts.GB);
9595

9696
ContainerBalancerTask task = mockedScm.startBalancerTaskAsync(config, false);
97-
LambdaTestUtils.await(1000, 500,
97+
LambdaTestUtils.await(5000, 10,
9898
() -> task.getCurrentIterationsStatistic().size() == 1 &&
99-
task.getCurrentIterationsStatistic().get(0).getIterationResult().equals("ITERATION_COMPLETED"));
99+
"ITERATION_COMPLETED".equals(task.getCurrentIterationsStatistic().get(0).getIterationResult()));
100100
List<ContainerBalancerTaskIterationStatusInfo> iterationsStatic = task.getCurrentIterationsStatistic();
101101
assertEquals(1, iterationsStatic.size());
102102

@@ -160,9 +160,9 @@ void testGetCurrentStatisticsWhileBalancingInProgress() throws Exception {
160160

161161
ContainerBalancerTask task = mockedScm.startBalancerTaskAsync(config, false);
162162
// Get the current iteration statistics when it has information about the containers moving.
163-
LambdaTestUtils.await(5000, 1, () -> task.getCurrentIterationsStatistic().size() == 2 &&
164-
task.getCurrentIterationsStatistic().get(1).getContainerMovesScheduled() > 0
165-
);
163+
LambdaTestUtils.await(5000, 1,
164+
() -> task.getCurrentIterationsStatistic().size() == 2 &&
165+
task.getCurrentIterationsStatistic().get(1).getContainerMovesScheduled() > 0);
166166
List<ContainerBalancerTaskIterationStatusInfo> iterationsStatic = task.getCurrentIterationsStatistic();
167167
assertEquals(2, iterationsStatic.size());
168168
ContainerBalancerTaskIterationStatusInfo currentIteration = iterationsStatic.get(1);

0 commit comments

Comments
 (0)