This is an automated email from the ASF dual-hosted git repository.
zhuzh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new af98780a0fe [FLINK-39326][runtime] Fix
DispatcherApplicationTest.testJobResultNotMarkedCleanUntilApplicationTerminates
af98780a0fe is described below
commit af98780a0fe528b0a944ae09a24f8325b4857e52
Author: Yi Zhang <[email protected]>
AuthorDate: Thu Mar 26 10:04:26 2026 +0800
[FLINK-39326][runtime] Fix
DispatcherApplicationTest.testJobResultNotMarkedCleanUntilApplicationTerminates
---
.../runtime/dispatcher/DispatcherApplicationTest.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git
a/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherApplicationTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherApplicationTest.java
index 06e92581bd1..16c8d76d072 100644
---
a/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherApplicationTest.java
+++
b/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherApplicationTest.java
@@ -633,6 +633,10 @@ public class DispatcherApplicationTest {
.build());
jobManagerRunner.completeResultFuture(completedExecutionGraphInfo);
+ // wait until the dirty job result is created
+ CommonTestUtils.waitUntilCondition(
+ () ->
haServices.getJobResultStore().hasDirtyJobResultEntryAsync(jobId).get());
+
// job termination future should not be completed
assertThatThrownBy(
() ->
@@ -642,10 +646,8 @@ public class DispatcherApplicationTest {
.isInstanceOf(TimeoutException.class);
// verify that the job result is NOT marked clean yet
- assertThat(
-
haServices.getJobResultStore().getDirtyResults().stream()
- .anyMatch(r -> r.getJobId().equals(jobId)))
- .isTrue();
+
assertThat(haServices.getJobResultStore().hasCleanJobResultEntryAsync(jobId).get())
+ .isFalse();
CompletableFuture<?> applicationTerminationFuture =
dispatcher.getApplicationTerminationFuture(applicationId);
@@ -662,9 +664,7 @@ public class DispatcherApplicationTest {
.get(TIMEOUT.toMillis(), TimeUnit.MILLISECONDS);
// verify that the job result is now marked clean
- assertThat(
-
haServices.getJobResultStore().getDirtyResults().stream()
- .noneMatch(r -> r.getJobId().equals(jobId)))
+
assertThat(haServices.getJobResultStore().hasCleanJobResultEntryAsync(jobId).get())
.isTrue();
}