1
0
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:
Nedyalko Dyakov
2025-10-17 16:46:20 +03:00
parent f8867759da
commit 72cf74a6be

View File

@@ -860,12 +860,15 @@ var _ = Describe("Credentials Provider Priority", func() {
client.AddHook(recorder.Hook())
// wrongpass
Expect(client.Ping(context.Background()).Err()).To(HaveOccurred())
time.Sleep(10 * time.Millisecond)
Expect(recorder.Contains("AUTH initial_user")).To(BeTrue())
// Update credentials
opt.StreamingCredentialsProvider.(*mockStreamingProvider).updates <- updatedCreds
// wrongpass
time.Sleep(10 * time.Millisecond)
Expect(client.Ping(context.Background()).Err()).To(HaveOccurred())
time.Sleep(10 * time.Millisecond)
Expect(recorder.Contains("AUTH updated_user")).To(BeTrue())
close(updatesChan)
})