skoppu22 commented on code in PR #2648:
URL: https://github.com/apache/cassandra/pull/2648#discussion_r1332992470
##########
test/unit/org/apache/cassandra/tools/nodetool/InvalidateCIDRPermissionsCacheTest.java:
##########
@@ -118,10 +115,13 @@ public void testInvalidateSingleCidrPermission()
// ensure cidr permission is cached
role.hasAccessFromIp(ipAddr);
assertThat(originalReadsCount).isEqualTo(getCidrPermissionsReadCount());
+ assertThat(((CassandraCIDRAuthorizer)
DatabaseDescriptor.getCIDRAuthorizer()).has(ROLE_A)).isTrue();
Review Comment:
`"Invalidated the role role_a from CIDR permissions cache"` gets printed
only when entry exists before invalidation. i.e,
`assertThat(tool.getStdout()).contains("Invalidated the role role_a from CIDR
permissions cache");` below at line 123 you added ensures that invalidation of
a role was successful. So we do not need has(role) function.
--
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]