dcapwell commented on code in PR #4087: URL: https://github.com/apache/cassandra/pull/4087#discussion_r2047823574
########## test/unit/org/apache/cassandra/db/compaction/unified/ControllerTest.java: ########## @@ -121,6 +121,50 @@ public void testValidateOptionsIntegers() testValidateOptions(true); } + @Test + public void testValidateOptionsInvalidTargetSSTableSize() + { + //Test 1: TARGET_SSTABLE_SIZE_OPTION = 12E899, the value reported in CASSANDRA-20398 + try { + Map<String, String> options = new HashMap<>(); + options.putIfAbsent(Controller.TARGET_SSTABLE_SIZE_OPTION, "12E899"); + Controller.validateOptions(options); + fail("TARGET_SSTABLE_SIZE_OPTION = 12E899 should have caused exception"); + } catch(ConfigurationException e) { + } Review Comment: please remove the try/catch. https://cassandra.apache.org/_/development/code_style.html >Never ever write catch (…) {} or catch (…) { logger.error() } merely to satisfy Java’s compile-time exception checking. -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org