tillrohrmann commented on a change in pull request #14431:
URL: https://github.com/apache/flink/pull/14431#discussion_r547200872
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java
##########
@@ -1452,20 +1345,17 @@ public JobGraph createKvJobGraph() {
public void testRequestKvStateWithIrrelevantRegistration() throws
Exception {
final JobGraph graph = createKvJobGraph();
- final JobMaster jobMaster = createJobMaster(
- configuration,
- graph,
- haServices,
- new TestingJobManagerSharedServicesBuilder().build(),
- heartbeatServices);
+ final JobMaster jobMaster = new JobMasterBuilder(graph,
rpcService)
+ .withConfiguration(configuration)
+ .withHighAvailabilityServices(haServices)
+ .withHeartbeatServices(heartbeatServices)
+ .createJobMaster();
+
+ jobMaster.start();
- CompletableFuture<Acknowledge> startFuture =
jobMaster.start(jobMasterId);
final JobMasterGateway jobMasterGateway =
jobMaster.getSelfGateway(JobMasterGateway.class);
try {
- // wait for the start to complete
- startFuture.get(testingTimeout.toMilliseconds(),
TimeUnit.MILLISECONDS);
-
// register an irrelevant KvState
try {
jobMasterGateway.notifyKvStateRegistered(
Review comment:
There is no need for this. After `jobMaster.start()` is being called all
subsequent messages which are sent to the `JobMaster` will be executed. The
reason is that we only have a single mailbox which is processed one after
another: `START; notifyKvStateRegistered; ....`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]