-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: spop binlog , rewritten as srem #2541
Conversation
跟 显荣 问下,怎么补充一个 go test |
Ask Xianrong how to add a go test |
在 It("should SRem", func() {
sAdd := client.SAdd(ctx, "set", "one")
Expect(sAdd.Err()).NotTo(HaveOccurred())
sAdd = client.SAdd(ctx, "set", "two")
Expect(sAdd.Err()).NotTo(HaveOccurred())
sAdd = client.SAdd(ctx, "set", "three")
Expect(sAdd.Err()).NotTo(HaveOccurred())
sRem := client.SRem(ctx, "set", "one")
Expect(sRem.Err()).NotTo(HaveOccurred())
Expect(sRem.Val()).To(Equal(int64(1)))
sRem = client.SRem(ctx, "set", "four")
Expect(sRem.Err()).NotTo(HaveOccurred())
Expect(sRem.Val()).To(Equal(int64(0)))
sMembers := client.SMembers(ctx, "set")
Expect(sMembers.Err()).NotTo(HaveOccurred())
Expect(sMembers.Val()).To(ConsistOf([]string{"three", "two"}))
sRem = client.SRem(ctx, "nonexistent_set", "one")
Expect(sRem.Err()).NotTo(HaveOccurred())
Expect(sRem.Val()).To(Equal(int64(0)))
}) |
LGTM |
* fix: spop binlog
* fix: spop binlog
* fix: spop binlog
fix: #2407