Skip to content

Commit 6b9cbe8

Browse files
authored
fix(test): fix a timing issue in pubsub test (#3498)
Signed-off-by: Xiaolong Chen <[email protected]>
1 parent e91f6ce commit 6b9cbe8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pubsub_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ var _ = Describe("PubSub", func() {
113113
pubsub := client.SSubscribe(ctx, "mychannel", "mychannel2")
114114
defer pubsub.Close()
115115

116+
// Let Redis process the ssubscribe command.
117+
time.Sleep(10 * time.Millisecond)
118+
116119
channels, err = client.PubSubShardChannels(ctx, "mychannel*").Result()
117120
Expect(err).NotTo(HaveOccurred())
118121
Expect(channels).To(ConsistOf([]string{"mychannel", "mychannel2"}))

0 commit comments

Comments
 (0)