The test suits hook the query function and uses a shared variable to change the hook. This causes conflicts when test A has an aysnc query still running, and B swaps the hook function, so the function will be called more than expected times.
Checklist
[N/A] The Pull Request has tests
[x] A changelog file has been added to CHANGELOG/unreleased/kong or adding skip-changelog label on PR if unnecessary. README.md
[x] The Pull Request has backports to all the versions it needs to cover
Summary
The test suits hook the query function and uses a shared variable to change the hook. This causes conflicts when test A has an aysnc query still running, and B swaps the hook function, so the function will be called more than expected times.
Checklist
CHANGELOG/unreleased/kong
or addingskip-changelog
label on PR if unnecessary. README.mdIssue reference
Fix KAG-4519