From 72cf74a6be6d2ded00c106c08ca83cbd3ba061b6 Mon Sep 17 00:00:00 2001 From: Nedyalko Dyakov Date: Fri, 17 Oct 2025 16:46:20 +0300 Subject: [PATCH] give some time for the background to execute commands --- redis_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redis_test.go b/redis_test.go index 69489e78..ef109751 100644 --- a/redis_test.go +++ b/redis_test.go @@ -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) })