jdeppe-pivotal commented on a change in pull request #7019:
URL: https://github.com/apache/geode/pull/7019#discussion_r737805868
##########
File path:
geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/AbstractSubscriptionManager.java
##########
@@ -87,6 +90,18 @@ public int getSubscriptionCount() {
return sum;
}
+ public int getUniqueSubscriptionCount() {
+ Set<ByteBuffer> uniques = new HashSet<>();
+ for (ClientSubscriptionManager manager : clientManagers.values()) {
+ for (Subscription s : manager.getSubscriptions()) {
+ for (byte[] bytes : s.getClient().getPatternSubscriptions()) {
+ uniques.add(ByteBuffer.wrap(bytes).asReadOnlyBuffer());
+ }
+ }
+ }
+ return uniques.size();
Review comment:
Ah - nice!
##########
File path:
geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/AbstractUnknownIntegrationTest.java
##########
@@ -64,12 +64,6 @@ public void
givenUnknownCommand_withEmptyStringArgument_returnsUnknownCommandErr
"ERR unknown command `fhqwhgads`, with args beginning with:
`EVERYBODY`, ``, ");
}
- @Test // HELLO is not a recognized command until Redis 6.0.0
- public void
givenHelloCommand_returnsUnknownCommandErrorWithArgumentsListed() {
- assertThatThrownBy(() -> jedis.sendCommand(() -> "HELLO".getBytes()))
- .hasMessage("ERR unknown command `HELLO`, with args beginning with: ");
- }
-
Review comment:
Done
--
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]