From 5fa7236f2b63adfe36b4d5dedac60047da3245f4 Mon Sep 17 00:00:00 2001 From: uki00a Date: Fri, 18 Feb 2022 04:38:07 +0900 Subject: [PATCH] test: deflake 'client unblock with timeout' test --- tests/client_test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/client_test.ts b/tests/client_test.ts index 38105672..ed0f5a3c 100644 --- a/tests/client_test.ts +++ b/tests/client_test.ts @@ -174,9 +174,10 @@ Deno.test("client", async (t) => { const tempClient = await newClient({ hostname: "127.0.0.1", port }); try { const id = await tempClient.clientID(); - tempClient.brpop(0, "key1"); // Block. + const promise = tempClient.brpop(0, "key1"); // Block. await delay(5); // Give some leeway for brpop to reach redis. assertEquals(await client.clientUnblock(id, "TIMEOUT"), 1); + await promise; } finally { tempClient.close(); }