rkhachatryan commented on code in PR #21778:
URL: https://github.com/apache/flink/pull/21778#discussion_r1091779426


##########
flink-tests/src/test/java/org/apache/flink/test/state/TaskManagerWideRocksDbMemorySharingITCase.java:
##########
@@ -100,116 +81,48 @@ public void init() throws Exception {
     @After
     public void destroy() {
         cluster.after();
-        metricsReporter.close();
     }
 
-    @Ignore
     @Test
     public void testBlockCache() throws Exception {
+        List<Cache> createdCaches = new CopyOnWriteArrayList<>();
+        List<WriteBufferManager> createdWriteBufferManagers = new 
CopyOnWriteArrayList<>();
+        TestingRocksDBMemoryFactory memoryFactory =
+                new TestingRocksDBMemoryFactory(
+                        sharedObjects.add(createdCaches),
+                        sharedObjects.add(createdWriteBufferManagers));
         List<JobID> jobIDs = new ArrayList<>(NUMBER_OF_JOBS);
         try {
-            // launch jobs
             for (int i = 0; i < NUMBER_OF_JOBS; i++) {
-                
jobIDs.add(cluster.getRestClusterClient().submitJob(dag()).get());
+                
jobIDs.add(cluster.getRestClusterClient().submitJob(dag(memoryFactory)).get());
             }
-
-            // wait for init
-            Deadline initDeadline = Deadline.fromNow(Duration.ofMinutes(1));
             for (JobID jid : jobIDs) {
                 waitForAllTaskRunning(cluster.getMiniCluster(), jid, false);
-                waitForAllMetricsReported(jid, initDeadline);
             }
+            Assert.assertEquals(1, createdCaches.size());

Review Comment:
   Right: there will be a cache per task if memory is shared inside slot, and 
no caches if memory is not shared.



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