dmvk commented on a change in pull request #18189:
URL: https://github.com/apache/flink/pull/18189#discussion_r787614773



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/runner/SessionDispatcherLeaderProcessTest.java
##########
@@ -130,28 +146,56 @@ public void 
start_triggersJobGraphRecoveryAndDispatcherServiceCreation() throws
         final CompletableFuture<Collection<JobGraph>> recoveredJobGraphsFuture 
=
                 new CompletableFuture<>();
         dispatcherServiceFactory =
-                TestingDispatcherServiceFactory.newBuilder()
-                        .setCreateFunction(
-                                (fencingToken,
-                                        recoveredJobGraphs,
-                                        jobResults,
-                                        jobGraphStore,
-                                        jobResultStore) -> {
-                                    
recoveredJobGraphsFuture.complete(recoveredJobGraphs);
-                                    return 
TestingDispatcherGatewayService.newBuilder().build();
-                                })
-                        .build();
+                createFactoryBasedOnJobGraphs(
+                        recoveredJobGraphs -> {
+                            
recoveredJobGraphsFuture.complete(recoveredJobGraphs);
+                            return 
TestingDispatcherGatewayService.newBuilder().build();
+                        });
 
         try (final SessionDispatcherLeaderProcess dispatcherLeaderProcess =
                 createDispatcherLeaderProcess()) {
             dispatcherLeaderProcess.start();
-            assertThat(
-                    dispatcherLeaderProcess.getState(),
-                    is(SessionDispatcherLeaderProcess.State.RUNNING));
+            assertThat(recoveredJobGraphsFuture)
+                    .succeedsWithin(100, TimeUnit.MILLISECONDS)

Review comment:
       Yes. In case of regular timeout we lose any context that might be used 
for identifying the root cause.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to