milleruntime commented on a change in pull request #1614:
URL: https://github.com/apache/accumulo/pull/1614#discussion_r434774157
##########
File path: test/src/main/java/org/apache/accumulo/test/functional/BulkNewIT.java
##########
@@ -183,6 +186,29 @@ public void testSingleTabletSingleFileOffline() throws
Exception {
}
}
+ @Test
+ public void testMaxTablets() throws Exception {
+ try (AccumuloClient client =
Accumulo.newClient().from(getClientProps()).build()) {
+ tableName = "testMaxTablets_table1";
+ NewTableConfiguration newTableConf = new NewTableConfiguration();
+ // set logical time type so we can set time on bulk import
+ Map<String,String> props = new HashMap<>();
+ props.put(Property.TABLE_BULK_MAX_TABLETS.getKey(), "1");
+ newTableConf.setProperties(props);
+ client.tableOperations().create(tableName, newTableConf);
+
+ // test max tablets hit while inspecting bulk files
+ var thrown = assertThrows(RuntimeException.class, () ->
testBulkFile(false, false));
+ var c = thrown.getCause();
+ assertTrue("Wrong exception: " + c, c instanceof ExecutionException);
+ assertTrue("Wrong exception: " + c.getCause(),
+ c.getCause() instanceof IllegalArgumentException);
+
Review comment:
Opened up #1619 so we don't forget
----------------------------------------------------------------
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]