tolbertam commented on code in PR #3085:
URL: https://github.com/apache/cassandra/pull/3085#discussion_r1479969600
##########
src/java/org/apache/cassandra/transport/Server.java:
##########
@@ -306,6 +315,24 @@ int countConnectedClients()
return allChannels.size() != 0 ? allChannels.size() - 1 : 0;
}
+ int countConnectedClients(Predicate<ServerConnection> predicate)
+ {
+ int count = 0;
+ for (Channel c : allChannels)
Review Comment:
:+1: let me think about how I can test this. The challenge will be that I
think to reproduce it the channel will need to be closed. This approach was
borrowed from other methods on the class (`countConnectedClientsByUser`) so
maybe there is some existing test precedence I can pull from.
Alternatively I could probably inject an unexpected failure using
byteman..will keep thinking on this.
--
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]