xintongsong commented on a change in pull request #15273:
URL: https://github.com/apache/flink/pull/15273#discussion_r597442899



##########
File path: 
flink-core/src/test/java/org/apache/flink/core/memory/OffHeapUnsafeMemorySegmentTest.java
##########
@@ -58,4 +61,31 @@ public void testCallCleanerOnFree() {
                 .free();
         assertTrue(cleanerFuture.isDone());
     }
+
+    @Test
+    public void testCallCleanerOnceOnConcurrentFree() throws 
InterruptedException {
+        final AtomicInteger counter = new AtomicInteger(0);

Review comment:
       By "throwing path", do you mean the path that `checkMultipleFree` is 
activated? I think that should be covered by the current test case as long as 
the env is set, which I've verified manually.
   
   Not sure if we need two different test cases with `checkMultipleFree` set 
differently. The two cases would have to be executed in different processes, 
because `checkMultipleFree` is determined only when the class `MemorySegment` 
is first loaded.




-- 
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:
[email protected]


Reply via email to