mirror of
https://github.com/redis/go-redis.git
synced 2025-10-18 22:08:50 +03:00
give some time for the background to execute commands
This commit is contained in:
@@ -860,12 +860,15 @@ var _ = Describe("Credentials Provider Priority", func() {
|
|||||||
client.AddHook(recorder.Hook())
|
client.AddHook(recorder.Hook())
|
||||||
// wrongpass
|
// wrongpass
|
||||||
Expect(client.Ping(context.Background()).Err()).To(HaveOccurred())
|
Expect(client.Ping(context.Background()).Err()).To(HaveOccurred())
|
||||||
|
time.Sleep(10 * time.Millisecond)
|
||||||
Expect(recorder.Contains("AUTH initial_user")).To(BeTrue())
|
Expect(recorder.Contains("AUTH initial_user")).To(BeTrue())
|
||||||
|
|
||||||
// Update credentials
|
// Update credentials
|
||||||
opt.StreamingCredentialsProvider.(*mockStreamingProvider).updates <- updatedCreds
|
opt.StreamingCredentialsProvider.(*mockStreamingProvider).updates <- updatedCreds
|
||||||
// wrongpass
|
// wrongpass
|
||||||
|
time.Sleep(10 * time.Millisecond)
|
||||||
Expect(client.Ping(context.Background()).Err()).To(HaveOccurred())
|
Expect(client.Ping(context.Background()).Err()).To(HaveOccurred())
|
||||||
|
time.Sleep(10 * time.Millisecond)
|
||||||
Expect(recorder.Contains("AUTH updated_user")).To(BeTrue())
|
Expect(recorder.Contains("AUTH updated_user")).To(BeTrue())
|
||||||
close(updatesChan)
|
close(updatesChan)
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user