gaopeng172 commented on code in PR #26431:
URL: https://github.com/apache/flink/pull/26431#discussion_r2048181733


##########
flink-runtime/src/test/java/org/apache/flink/runtime/util/profiler/ProfilingServiceTest.java:
##########
@@ -56,7 +56,7 @@ public class ProfilingServiceTest extends TestLogger {
     void setUp(@TempDir Path tempDir) {
         configs.set(RestOptions.MAX_PROFILING_HISTORY_SIZE, 
HISTORY_SIZE_LIMIT);
         configs.set(RestOptions.PROFILING_RESULT_DIR, tempDir.toString());
-        profilingService = ProfilingService.getInstance(configs);
+        profilingService = ProfilingService.getInstanceForTest(configs);

Review Comment:
   The real `ProfilingService.getInstance(configs)` method requires the 
singleton mode to act on the entire jm and tm life cycle in formal use. There 
is no problem with the class lock of this method.
   
   However, this method will conflict with other test methods when executing 
the global mvn test, so my modification is to add a test-specific 
`ProfilingService.getInstanceForTest(configs)` implementation. The use of class 
locks is also to avoid conflicts in testing.



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

Reply via email to