Skip to content

Commit 4fd3432

Browse files
author
huyuanfeng
committed
fix bug for Tester
1 parent 3c28969 commit 4fd3432

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

flink-autoscaler-standalone/src/test/java/org/apache/flink/autoscaler/standalone/StandaloneAutoscalerValidatorTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ void testAutoScalerWithInvalidConfig() throws Exception {
6767
final var jobAutoScaler =
6868
new JobAutoScaler<JobID, JobAutoScalerContext<JobID>>() {
6969
@Override
70-
public void scale(JobAutoScalerContext<JobID> context) {
70+
public void scale(JobAutoScalerContext<JobID> context)
71+
throws InterruptedException {
7172
scaleCounter.merge(context.getJobKey(), 1, Integer::sum);
7273
}
7374

@@ -83,6 +84,10 @@ public void cleanup(JobAutoScalerContext<JobID> context) {
8384

8485
List<CompletableFuture<Void>> scaledFutures = autoscalerExecutor.scaling();
8586

87+
for (CompletableFuture<Void> scaledFuture : scaledFutures) {
88+
scaledFuture.get();
89+
}
90+
8691
// Verification triggers two scaling tasks
8792
assertThat(scaledFutures).hasSize(2);
8893

0 commit comments

Comments
 (0)