keith-turner commented on code in PR #6037:
URL: https://github.com/apache/accumulo/pull/6037#discussion_r2643709884
##########
test/src/main/java/org/apache/accumulo/test/NewTableConfigurationIT.java:
##########
@@ -534,14 +534,12 @@ public void testConflictsWithDefaults() throws Exception {
*/
// add an iterator with same priority as the default iterator
var iterator1 = new IteratorSetting(20, "foo", "foo.bar");
- var exception = assertThrows(IllegalStateException.class, () ->
client.tableOperations()
- .create(table, new
NewTableConfiguration().attachIterator(iterator1)));
- assertTrue(exception.getMessage().contains("iterator priority
conflict"));
+ assertThrows(IllegalStateException.class, () ->
client.tableOperations().create(table,
+ new NewTableConfiguration().attachIterator(iterator1)));
Review Comment:
ok, why not check the messages if its possible to do so? The code under
test could fail for a different reason than the test intended, like some other
thing in the code could throw that common exception. Checking the message
helps make sure the failure is as expected and that its actually testing what
its intended. I have had this happen before and accidentally realized the test
was not working as intended.
--
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]