zentol commented on a change in pull request #14431: URL: https://github.com/apache/flink/pull/14431#discussion_r547198838
########## 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: How do we guarantee that the JobMaster has already fully started at this point? Until JobMaster#onStart has finished the AkkaRpcActor is still officially in a stopped state and would reject any incoming message, correct? ---------------------------------------------------------------- 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: us...@infra.apache.org