TsReaper commented on a change in pull request #12037: URL: https://github.com/apache/flink/pull/12037#discussion_r424830919
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorSchedulerTest.java ########## @@ -163,6 +165,56 @@ public void taskTaskManagerFailuresAreReportedBack() throws Exception { assertThat(result, futureFailedWith(TestException.class)); } + @Test + @SuppressWarnings("unchecked") + public void testDeliveringClientRequestToResponser() throws Exception { Review comment: This should be `testDeliveringClientRequestToRequestHandler` now as the name of the interface is changed to `CoordinationRequestHandler`. ########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorSchedulerTest.java ########## @@ -163,6 +165,56 @@ public void taskTaskManagerFailuresAreReportedBack() throws Exception { assertThat(result, futureFailedWith(TestException.class)); } + @Test + @SuppressWarnings("unchecked") + public void testDeliveringClientRequestToResponser() throws Exception { + final OperatorCoordinator.Provider provider = new TestingCoordinationRequestHandler.Provider(testOperatorId); + final DefaultScheduler scheduler = createScheduler(provider); + + final String payload = "testing payload"; + final TestingCoordinationRequestHandler.Request<String> request = + new TestingCoordinationRequestHandler.Request<>(payload); + final TestingCoordinationRequestHandler.Response<String> response = + (TestingCoordinationRequestHandler.Response<String>) + scheduler.deliverCoordinationRequestToCoordinator(testOperatorId, request).get(); + + assertEquals(payload, response.getPayload()); + } + + @Test(expected = FlinkException.class) + public void testDeliveringClientRequestToNonResponser() throws Exception { Review comment: This should be `testDeliveringClientRequestToNonRequestHandler` now as the name of the interface is changed to `CoordinationRequestHandler`. ---------------------------------------------------------------- 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