You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/06/29 07:45:23 UTC

[GitHub] [hadoop-ozone] cku328 commented on a change in pull request #1146: HDDS-2978. Intermittent failure in TestResourceLimitCache

cku328 commented on a change in pull request #1146:
URL: https://github.com/apache/hadoop-ozone/pull/1146#discussion_r446832994



##########
File path: hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/utils/TestResourceLimitCache.java
##########
@@ -60,25 +58,27 @@ public void testResourceLimitCache()
     resourceCache.remove(4);
 
     GenericTestUtils.waitFor(future::isDone, 100, 1000);
-    // map has the ket 1
+    // map has the key 1
     Assert.assertTrue(future.isDone() && !future.isCompletedExceptionally());
     Assert.assertNotNull(resourceCache.get(1));
 
     // Create a future which blocks to put 4. Currently map has acquired 7
     // permits out of 10
+    ExecutorService pool = Executors.newCachedThreadPool();
     future = CompletableFuture.supplyAsync(() -> {
       try {
         return resourceCache.put(4, "a");
       } catch (InterruptedException e) {
-        e.printStackTrace();
+        return null;
       }
-      return null;
     });

Review comment:
       Thanks @adoroszlai for the notification.
   After testing, I want to re-apply this modification in a new branch, and I missed it.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org