zentol commented on code in PR #21012: URL: https://github.com/apache/flink/pull/21012#discussion_r996925478
########## flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/handlers/JarHandlerParameterTest.java: ########## @@ -211,6 +218,37 @@ void testProvideJobId() throws Exception { assertThat(jobGraph.get().getJobID()).isEqualTo(jobId); } + @Test + void testProvideFlinkConfig() throws Exception { + + REQB jarRequestBodyWithFlinkConfig = getJarRequestBodyWithFlinkConfig(FLINK_CONFIGURATION); + HandlerRequest<REQB> request = + createRequest( + getJarRequestBodyWithFlinkConfig(FLINK_CONFIGURATION), Review Comment: ```suggestion jarRequestBodyWithFlinkConfig, ``` ########## flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/handlers/JarHandlerParameterTest.java: ########## @@ -211,6 +218,37 @@ void testProvideJobId() throws Exception { assertThat(jobGraph.get().getJobID()).isEqualTo(jobId); } + @Test + void testProvideFlinkConfig() throws Exception { + + REQB jarRequestBodyWithFlinkConfig = getJarRequestBodyWithFlinkConfig(FLINK_CONFIGURATION); + HandlerRequest<REQB> request = + createRequest( + getJarRequestBodyWithFlinkConfig(FLINK_CONFIGURATION), + getUnresolvedJarMessageParameters(), + getUnresolvedJarMessageParameters(), + jarWithManifest); + + handleRequest(request); + + Optional<JobGraph> jobGraph = getLastSubmittedJobGraphAndReset(); + + assertThat(jobGraph.isPresent()).isTrue(); + JobGraph graph = jobGraph.get(); + + assertThat(getExecutionConfig(graph).getParallelism()) + .isNotEqualTo( + Integer.valueOf( + FLINK_CONFIGURATION.get(CoreOptions.DEFAULT_PARALLELISM.key()))); + if (jarRequestBodyWithFlinkConfig instanceof JarRunRequestBody) { Review Comment: It is actually a bit questionable to have this only work for the JarRunHandler; the 2 handlers should generally have the same capabilities; the whole point of the JarPlanHandler is to get a preview of the job after all. ########## flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/handlers/JarHandlerParameterTest.java: ########## @@ -211,6 +218,37 @@ void testProvideJobId() throws Exception { assertThat(jobGraph.get().getJobID()).isEqualTo(jobId); } + @Test + void testProvideFlinkConfig() throws Exception { + + REQB jarRequestBodyWithFlinkConfig = getJarRequestBodyWithFlinkConfig(FLINK_CONFIGURATION); + HandlerRequest<REQB> request = + createRequest( + getJarRequestBodyWithFlinkConfig(FLINK_CONFIGURATION), + getUnresolvedJarMessageParameters(), + getUnresolvedJarMessageParameters(), + jarWithManifest); + + handleRequest(request); + + Optional<JobGraph> jobGraph = getLastSubmittedJobGraphAndReset(); + + assertThat(jobGraph.isPresent()).isTrue(); + JobGraph graph = jobGraph.get(); + + assertThat(getExecutionConfig(graph).getParallelism()) + .isNotEqualTo( + Integer.valueOf( + FLINK_CONFIGURATION.get(CoreOptions.DEFAULT_PARALLELISM.key()))); Review Comment: I don't understand why this assertion is passing. For the JarPlanHandler, sure, because it doesn't support the configuration, but why isn't this setting honored by the JarRunHandler? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org