XComp commented on a change in pull request #18189:
URL: https://github.com/apache/flink/pull/18189#discussion_r787472097
##########
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:
Why is that again? Was it about making the test timeout which would
provide a stacktrace of the waiting threads? 🤔
--
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]