yifan-c commented on code in PR #1931:
URL: https://github.com/apache/cassandra/pull/1931#discussion_r1015913522
##########
test/unit/org/apache/cassandra/service/StorageServiceTest.java:
##########
@@ -298,12 +298,21 @@ public void testBatchSizeWarnThresholdInKiB()
storageService.setBatchSizeWarnThresholdInKiB(2 * 1024 * 1024);
fail("Should have received an IllegalArgumentException
batch_size_warn_threshold = 2GiB");
}
- catch (IllegalArgumentException ignored) { }
+ catch (IllegalArgumentException ignored)
+ {
+ }
Assert.assertEquals(1024,
storageService.getBatchSizeWarnThresholdInKiB());
}
finally
{
storageService.setBatchSizeWarnThresholdInKiB(previousBatchSizeWarnThreshold);
}
}
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testLocalDatacenterNodesExcludedDuringRebuild()
+ {
+ StorageService service = StorageService.instance;
+ service.rebuild(DatabaseDescriptor.getLocalDataCenter(),
"StorageServiceTest", null, null, true);
+ }
Review Comment:
Right, but the point is to assert the exception message too. `AssertJ` api
can also do it.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]