Skip to content

Commit

Permalink
test: fix race in redis-4 tests (open-telemetry#1863)
Browse files Browse the repository at this point in the history
The beforeEach() hook was not awaited, so afterEach() could run before
it completed, resulting in a client.disconnect() that rejects, and a
mocha hook that calls done() twice.

Refs: open-telemetry#1860

Co-authored-by: Marc Pichler <[email protected]>
  • Loading branch information
trentm and pichlermarc authored Dec 14, 2023
1 parent 4f98916 commit 63520b1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('redis@^4.0.0', () => {
client = createClient({
url: redisTestUrl,
});
context.with(suppressTracing(context.active()), async () => {
await context.with(suppressTracing(context.active()), async () => {
await client.connect();
});
});
Expand Down

0 comments on commit 63520b1

Please sign in to comment.