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



##########
File path: test/src/main/java/org/apache/accumulo/test/ExternalCompactionIT.java
##########
@@ -193,22 +195,55 @@ public boolean accept(Key k, Value v) {
 
   }
 
+  @Before
+  public void setUp() throws Exception {
+    if (SharedMiniClusterBase.getCluster() == null) {
+      SharedMiniClusterBase.startMiniClusterWithConfig(this);
+    }
+  }
+
+  private void stopProcess(Process process) throws Exception {
+    if (process.supportsNormalTermination()) {
+      process.destroyForcibly();
+    } else {
+      LOG.info("Stopping process manually");
+      new ProcessBuilder("kill", Long.toString(process.pid())).start();
+      process.waitFor();
+    }
+  }
+
+  private void cleanupTables(String... tables) {
+    try (AccumuloClient client = Accumulo.newClient()
+        
.from(SharedMiniClusterBase.getCluster().getClientProperties()).build()) {
+      for (String table : tables) {
+        try {
+          client.tableOperations().delete(table);
+        } catch (Exception e) {
+          fail("Error deleting table: " + table + ", msg: " + e.getMessage());
+        }
+      }
+    }
+  }

Review comment:
       I do need to delete them, or maybe change some other code. There are 
places in the tests where I am checking the external compaction final state 
markers in the metadata table and I'm expecting one entry. If I don't delete 
the table, then I end up with more than one. IIRC there is not a tableId in the 
final state marker for me to use to verify that it's complete. I'll 
double-check.
   




-- 
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:
[email protected]


Reply via email to