Skip to content
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(clustering): rebuild router with small worker_state_update_frequency #13876

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions spec/02-integration/09-hybrid_mode/01-sync_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe("CP/DP communication #" .. strategy .. " inc_sync=" .. inc_sync, functi
proxy_listen = "0.0.0.0:9002",
nginx_conf = "spec/fixtures/custom_nginx.template",
cluster_incremental_sync = inc_sync,
worker_state_update_frequency = 1,
}))

for _, plugin in ipairs(helpers.get_plugins_list()) do
Expand Down Expand Up @@ -270,13 +271,7 @@ describe("CP/DP communication #" .. strategy .. " inc_sync=" .. inc_sync, functi
method = "GET",
path = "/soon-to-be-disabled",
}))

if inc_sync == "on" then
-- XXX incremental sync does not skip_disabled_services by default
assert.res_status(200, res)
else
assert.res_status(404, res)
end
assert.res_status(404, res)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CP disabled service, so DP should return 404 to client.


proxy_client:close()
end)
Expand Down Expand Up @@ -351,7 +346,7 @@ describe("CP/DP communication #" .. strategy .. " inc_sync=" .. inc_sync, functi
end)
end)

describe("CP/DP #version check #" .. strategy, function()
describe("CP/DP #version check #" .. strategy .. " inc_sync=" .. inc_sync, function()
-- for these tests, we do not need a real DP, but rather use the fake DP
-- client so we can mock various values (e.g. node_version)
describe("relaxed compatibility check:", function()
Expand Down Expand Up @@ -627,7 +622,7 @@ describe("CP/DP #version check #" .. strategy, function()
end)
end)

describe("CP/DP config sync #" .. strategy, function()
describe("CP/DP config sync #" .. strategy .. " inc_sync=" .. inc_sync, function()
lazy_setup(function()
helpers.get_db_utils(strategy) -- runs migrations

Expand All @@ -650,6 +645,7 @@ describe("CP/DP config sync #" .. strategy, function()
cluster_control_plane = "127.0.0.1:9005",
proxy_listen = "0.0.0.0:9002",
cluster_incremental_sync = inc_sync,
worker_state_update_frequency = 1,
}))
end)

Expand Down
Loading