Skip to content

Commit b27b747

Browse files
committed
Adjust format and remove comment
Signed-off-by: hwware <[email protected]>
1 parent c9fe000 commit b27b747

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

src/pubsub.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,11 @@ void pubsubSubscribeChannel(client *c, robj *channel, pubsubtype type) {
279279
clients = dictCreate(&clientDictType);
280280
kvstoreDictSetVal(*type.serverPubSubChannels, slot, de, clients);
281281
incrRefCount(channel);
282-
serverLog(LL_WARNING, "The channel count is %d", type.subscriptionCount(c));
283282
}
284283

285284
serverAssert(dictAdd(clients, c, NULL) != DICT_ERR);
286285
serverAssert(dictInsertAtPosition(type.clientPubSubChannels(c), channel, position));
287286
incrRefCount(channel);
288-
serverLog(LL_WARNING, "The channel count is %d", type.subscriptionCount(c));
289-
290287
}
291288
}
292289

tests/unit/pubsub.tcl

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ start_server {tags {"pubsub network"}} {
4545
set rd1 [valkey_deferring_client]
4646

4747
# subscribe to two channels
48-
# assert_equal {1 2} [subscribe $rd1 {chan1 chan2}]
4948
assert_equal {1} [subscribe $rd1 {chan1}]
5049
assert_equal {2} [subscribe $rd1 {chan2}]
5150
assert_equal 1 [r publish chan1 hello]
@@ -85,7 +84,6 @@ start_server {tags {"pubsub network"}} {
8584

8685
test "PUBLISH/SUBSCRIBE after UNSUBSCRIBE without arguments" {
8786
set rd1 [valkey_deferring_client]
88-
# assert_equal {1 2 3} [subscribe $rd1 {chan1 chan2 chan3}]
8987
assert_equal {1} [subscribe $rd1 {chan1}]
9088
assert_equal {2} [subscribe $rd1 {chan2}]
9189
assert_equal {3} [subscribe $rd1 {chan3}]
@@ -109,20 +107,6 @@ start_server {tags {"pubsub network"}} {
109107
assert_equal {1} [subscribe $rd1 {chan1}]
110108
assert_equal {2} [subscribe $rd1 {chan2}]
111109
assert_equal {3} [subscribe $rd1 {chan3}]
112-
#assert_equal {1 1 1} [subscribe $rd1 {chan1 chan1 chan1}]
113-
assert_equal 1 [r publish chan1 hello]
114-
assert_equal {message chan1 hello} [$rd1 read]
115-
116-
# clean up clients
117-
$rd1 close
118-
}
119-
120-
test "SUBSCRIBE to one channel more than once" {
121-
set rd1 [valkey_deferring_client]
122-
assert_equal {1} [subscribe $rd1 {chan1}]
123-
assert_equal {2} [subscribe $rd1 {chan2}]
124-
assert_equal {3} [subscribe $rd1 {chan3}]
125-
#assert_equal {1 1 1} [subscribe $rd1 {chan1 chan1 chan1}]
126110
assert_equal 1 [r publish chan1 hello]
127111
assert_equal {message chan1 hello} [$rd1 read]
128112

@@ -504,10 +488,7 @@ start_server {tags {"pubsub network"}} {
504488
# Note: SUBSCRIBE and UNSUBSCRIBE with multiple channels in the same command,
505489
# Only one response is returned
506490
# This update matches with Redis response: one command always returns one response
507-
508491
assert_equal "subscribe foo 1 subscribe bar 2 subscribe baz 3" [r subscribe foo bar baz]
509-
# assert_equal "subscribe bar 2" [r read]
510-
# assert_equal "subscribe baz 3" [r read]
511492

512493
r multi
513494
r ping abc

tests/unit/pubsubshard.tcl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ start_server {tags {"pubsubshard external:skip"}} {
6464

6565
test "SSUBSCRIBE to one channel more than once" {
6666
set rd1 [valkey_deferring_client]
67-
#assert_equal {1 1 1} [ssubscribe $rd1 {chan1 chan1 chan1}]
6867
assert_equal {1} [ssubscribe $rd1 {chan1}]
6968
assert_equal {1} [ssubscribe $rd1 {chan1}]
7069
assert_equal {1} [ssubscribe $rd1 {chan1}]

0 commit comments

Comments
 (0)