zentol commented on code in PR #20810:
URL: https://github.com/apache/flink/pull/20810#discussion_r968372989


##########
flink-rpc/flink-rpc-akka/src/test/java/org/apache/flink/runtime/rpc/akka/ContextClassLoadingSettingTest.java:
##########
@@ -107,49 +108,87 @@ void shutdown() throws InterruptedException, 
ExecutionException, TimeoutExceptio
     void testAkkaRpcService_ExecuteRunnableSetsFlinkContextClassLoader()
             throws ExecutionException, InterruptedException {
         final CompletableFuture<ClassLoader> contextClassLoader = new 
CompletableFuture<>();
-        akkaRpcService.execute(
-                () -> 
contextClassLoader.complete(Thread.currentThread().getContextClassLoader()));
+        akkaRpcService
+                .getScheduledExecutor()
+                .execute(
+                        () ->
+                                contextClassLoader.complete(
+                                        
Thread.currentThread().getContextClassLoader()));
         assertIsFlinkClassLoader(contextClassLoader.get());
     }
 
     @Test
-    void testAkkaRpcService_ExecuteCallableSetsFlinkContextClassLoader()
+    void testAkkaRpcService_ScheduleCallableSetsFlinkContextClassLoader()
             throws ExecutionException, InterruptedException {
-        final CompletableFuture<ClassLoader> contextClassLoader =
-                akkaRpcService.execute(() -> 
Thread.currentThread().getContextClassLoader());
-        assertIsFlinkClassLoader(contextClassLoader.get());
+        final ClassLoader contextClassLoader =
+                akkaRpcService
+                        .getScheduledExecutor()
+                        .schedule(
+                                () -> 
Thread.currentThread().getContextClassLoader(),
+                                0,
+                                TimeUnit.MILLISECONDS)
+                        .get();
+        assertIsFlinkClassLoader(contextClassLoader);
     }
 
     @Test
-    void 
testAkkaRpcService_ExecuteCallableResultCompletedWithFlinkContextClassLoader()

Review Comment:
   This test isn't required anymore since no future is returned that could be 
completed with the Flink CCL.



-- 
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]

Reply via email to