-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests(integration): fix flakiness #12580
Conversation
Some tests might change the DB in front of this test, which causes incompatible data to prevent the CP from starting up.
ef1c397
to
2f2cd07
Compare
|
||
describe(PLUGIN_NAME .. ": (unit)", function() | ||
local mock | ||
local mock_response_file = pl_path.abspath( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note to myself: perhaps we could add a new API to use a file as the response for http_mock
.
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12580-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12580-to-master-to-upstream
git checkout -b cherry-pick-12580-to-master-to-upstream
ancref=$(git merge-base 84cb1be01d8e9a241e8a2b3afd6d55bb184e605b 2f2cd079dcb0bd179b1faea27cd49ad64cd69dca)
git cherry-pick -x $ancref..2f2cd079dcb0bd179b1faea27cd49ad64cd69dca |
Successfully created backport PR for |
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12580-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12580-to-master-to-upstream
git checkout -b cherry-pick-12580-to-master-to-upstream
ancref=$(git merge-base 84cb1be01d8e9a241e8a2b3afd6d55bb184e605b 2f2cd079dcb0bd179b1faea27cd49ad64cd69dca)
git cherry-pick -x $ancref..2f2cd079dcb0bd179b1faea27cd49ad64cd69dca |
Please REBASE and MERGE
Summary
The dynamic test scheduler exposed some issues by disrupting the order of the tests, some of which did not initialize the database or wrote incompatible data to the database, causing the Gateway instance to fail to start and causing the following test to fail.
Starting a Gateway instance even if it's not needed
spec/03-plugins/39-ai-request-transformer/01-transformer_spec.lua
spec/03-plugins/40-ai-response-transformer/01-transformer_spec.lua
These two test sets start a Gateway instance to launch a mocking server, which can be replaced by the
spec.helpers.http_mock
.The database was not initialized before starting the Gateway instance
spec/02-integration/09-hybrid_mode/02-start_stop_spec.lua
Starting a service using a fixed port instead of a random port
Since the test sequence is disrupted and the port release is not real-time, this may cause the port to be occupied to the point where the test fails.
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
KAG-3746