[ https://issues.apache.org/jira/browse/GEODE-8627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17216762#comment-17216762 ]
ASF GitHub Bot commented on GEODE-8627: --------------------------------------- jdeppe-pivotal commented on a change in pull request #5639: URL: https://github.com/apache/geode/pull/5639#discussion_r507788349 ########## File path: geode-redis/src/main/java/org/apache/geode/redis/internal/pubsub/Subscription.java ########## @@ -53,11 +53,15 @@ void publishMessage(byte[] channel, byte[] message, List<Object> createResponse(byte[] channel, byte[] message); /** - * Return the subscription name. In the case of a pattern the string representation of the - * pattern is returned. + * Return the channel name. In the case of a pattern null is returned. */ byte[] getChannelName(); + /** + * Return the pattern name. In the case of a channel null is returned. + */ + byte[] getPatternName(); Review comment: I can see that you want the method name to be more expressive, but I don't think it's good practice to have an API where some methods return null depending on what type of object you're using. That opens the door for a dev to easily make a mistake. I'd prefer to keep a single method but give it a more descriptive name. Perhaps `getSubscriptionName()` or `getChannelOrPattern()`. ########## File path: geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/pubsub/AbstractSubscriptionsIntegrationTest.java ########## @@ -88,18 +111,91 @@ public void multiSubscribe() { .untilAsserted(() -> assertThat(mockSubscriber.getReceivedPMessages()).hasSize(1)); assertThat(mockSubscriber.getReceivedEvents()).containsExactly("message", "pmessage"); mockSubscriber.unsubscribe(); - client.close(); } @Test - public void unallowedCommandsWhileSubscribed() { - Jedis client = new Jedis("localhost", getPort()); + public void unsubscribingImplicitlyFromAllChannels_doesNotUnsubscribeFromPatterns() { Review comment: Do we not already have similar tests in `AbstractPubSubIntegrationTest`? Perhaps `testUnsubscribingImplicitlyFromAllChannels` and `testPunsubscribingImplicitlyFromAllChannels`. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Redis not unsubscribing and punsubscribing correctly when no channel/pattern > provided > ------------------------------------------------------------------------------------- > > Key: GEODE-8627 > URL: https://issues.apache.org/jira/browse/GEODE-8627 > Project: Geode > Issue Type: Bug > Components: redis > Reporter: Sarah Abbey > Assignee: Sarah Abbey > Priority: Major > Labels: pull-request-available > > Geode Redis should unsubscribe from all channels (not including patterns) > when no channel is provided and punsubscribe from all patterns (not including > channels) when no pattern is provided. -- This message was sent by Atlassian Jira (v8.3.4#803005)