You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2023/03/06 13:11:08 UTC

[GitHub] [accumulo] dlmarion commented on a diff in pull request #3225: replace sleepUninterruptibly() with Thread.sleep() in tests

dlmarion commented on code in PR #3225:
URL: https://github.com/apache/accumulo/pull/3225#discussion_r1126394679


##########
test/src/main/java/org/apache/accumulo/test/functional/MemoryFreeingIterator.java:
##########
@@ -39,7 +38,12 @@ public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> op
     MemoryConsumingIterator.freeBuffers();
     while (this.isRunningLowOnMemory()) {
       // wait for LowMemoryDetector to recognize the memory is free.
-      Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
+      try {
+        Thread.sleep(SECONDS.toMillis(1));
+      } catch (InterruptedException ex) {
+        Thread.currentThread().interrupt();

Review Comment:
   I think these additions are going unchecked in the tests. `MemoryFreeingIterator` and `MemoryConsumingIterator` are used in the MemoryStarved*IT's. I don't think you can check them there as these are scan iterators. I don't think there is anything in the server-side scan code that checks this condition and relays it back to the client.



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org