Skip to content

Commit

Permalink
[Infra] Attempt to fix APMEventClient unit test (elastic#191268)
Browse files Browse the repository at this point in the history
closes [190703](elastic#190703)

## Summary

I'm not sure if this change will resolve the flakiness. What I
discovered is that the test had an open handle due to an unfinished
promise.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
crespocarlos and elasticmachine authored Aug 27, 2024
1 parent 6d3721a commit b98a8d3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ describe('APMEventClient', () => {
esClient: {
search: async (params: any, { signal }: { signal: AbortSignal }) => {
abortSignal = signal;
await setTimeoutPromise(3_000);
await setTimeoutPromise(3_000, undefined, {
signal: abortSignal,
});
return {};
},
} as any,
Expand Down

0 comments on commit b98a8d3

Please sign in to comment.