dlmarion commented on a change in pull request #2304:
URL: https://github.com/apache/accumulo/pull/2304#discussion_r723522668



##########
File path: 
test/src/main/java/org/apache/accumulo/test/functional/ConcurrentDeleteTableIT.java
##########
@@ -269,12 +228,53 @@ protected void doTableOp() throws Exception {
     }
   }
 
+  private abstract static class DelayedTableOp implements Runnable {
+    private final CountDownLatch cdl;
+
+    DelayedTableOp(CountDownLatch cdl) {
+      this.cdl = cdl;
+    }
+
+    @Override
+    public void run() {
+      try {
+        cdl.countDown();
+        cdl.await();
+        Thread.sleep(10);
+        doTableOp();
+      } catch (TableNotFoundException | TableOfflineException e) {
+        // expected
+      } catch (RuntimeException e) {
+        throw e;
+      } catch (Exception e) {
+        if (e.getCause().getClass().equals(ThriftTableOperationException.class)
+            && e.getMessage().equals("Table is being deleted")) {

Review comment:
       It might be useful to make `Table is being deleted` a static variable in 
`CompactionDriver` or `TableOperationsImpl`, then reference it from here  
`CompactionDriverTest` and `TableOperationsImpl`.




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