keith-turner commented on code in PR #4586:
URL: https://github.com/apache/accumulo/pull/4586#discussion_r1621434478
##########
test/src/main/java/org/apache/accumulo/test/compaction/CompactionExecutorIT.java:
##########
@@ -230,6 +255,35 @@ public void cleanup() {
}
}
+ @Test
+ public void testFailingPlanners() throws Exception {
+ // This test ensures that a table w/ failing compaction planner can still
be read and written.
+
+ try (AccumuloClient client =
Accumulo.newClient().from(getClientProps()).build()) {
+ createTable(client, "fail1", "cse1");
+ createTable(client, "fail2", "cse2");
+ createTable(client, "fail3", "cse3");
+
+ // ensure tablets can still be assigned and written w/ failing
compaction services
+ addFiles(client, "fail1", 30);
+ addFiles(client, "fail2", 30);
+ addFiles(client, "fail3", 30);
+
+ // ensure tablets can still be assigned and scanned w/ failing
compaction services
+ assertEquals(30, scanTable(client, "fail1").size());
+ assertEquals(30, scanTable(client, "fail2").size());
+ assertEquals(30, scanTable(client, "fail3").size());
+
+ // compactions should never run on these tables, but sleep a bit to be
sure
+ Thread.sleep(2000);
+
+ // do no expect any compactions to run
+ assertEquals(30, getFiles(client, "fail1").size());
+ assertEquals(30, getFiles(client, "fail2").size());
+ assertEquals(30, getFiles(client, "fail3").size());
+ }
+ }
+
Review Comment:
Nice, I have wanted to check logging in unit test in the past but did not
know how. Looked around and there is currently no unit test for
CompactionJobGenerator. Would need to add one to test logging, could be
something to look into as a follow on.
--
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]