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


##########
test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompaction_2_IT.java:
##########
@@ -301,6 +305,46 @@ public void testDeleteTableCancelsUserExternalCompaction() 
throws Exception {
     }
   }
 
+  @Test
+  public void testDeleteTableCancelsSleepingExternalCompaction() throws 
Exception {
+    
getCluster().getClusterControl().startCoordinator(CompactionCoordinator.class);
+    getCluster().getClusterControl().startCompactors(Compactor.class, 1, 
QUEUE4);
+
+    String table1 = this.getUniqueNames(1)[0];
+    try (AccumuloClient client =
+        Accumulo.newClient().from(getCluster().getClientProperties()).build()) 
{
+
+      createTable(client, table1, "cs4");
+      TableId tid = getCluster().getServerContext().getTableId(table1);
+      writeData(client, table1);
+
+      // The purpose of this test to ensure the sleeping thread is 
interrupted. The only way the
+      // compactor can cancel this compaction is if it interrupts the sleeping 
thread.
+      IteratorSetting iteratorSetting = new IteratorSetting(100, 
SlowIterator.class);
+      // Sleep so long that the test would timeout if the thread is not 
interrupted.
+      SlowIterator.setSleepTime(iteratorSetting, 600000);
+      SlowIterator.setSeekSleepTime(iteratorSetting, 600000);
+      SlowIterator.sleepUninterruptibly(iteratorSetting, false);

Review Comment:
   We should probably review the system iterators to make sure we are not 
sleeping uninterruptibly.



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