You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/10/27 20:06:53 UTC

[GitHub] [geode] jdeppe-pivotal commented on a change in pull request #7019: GEODE-9646: Update native redis tests to consistently use version 6.2.6

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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org