Skip to content

Commit

Permalink
test rpc with incremental sync
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Nov 5, 2024
1 parent 40b622b commit 9033a00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions spec/02-integration/18-hybrid_rpc/01-rpc_spec.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
local helpers = require "spec.helpers"
local cjson = require("cjson.safe")

for _, inc_sync in ipairs { "on", "off" } do
-- we need incremental sync to verify rpc
for _, inc_sync in ipairs { "on" } do
for _, strategy in helpers.each_strategy() do
describe("Hybrid Mode RPC #" .. strategy .. " inc_sync=" .. inc_sync, function()

Expand Down Expand Up @@ -52,12 +53,13 @@ for _, strategy in helpers.each_strategy() do

assert(json)

-- TODO: need a new test method
-- TODO: perhaps need a new test method
for _, v in pairs(json.data) do
if v.ip == "127.0.0.1" and v.rpc_capabilities and #v.rpc_capabilities ~= 0 then
table.sort(v.rpc_capabilities)
assert.near(14 * 86400, v.ttl, 3)
-- TODO: check the available rpc service
-- check the available rpc service
assert.same("kong.sync.v2", v.rpc_capabilities[1])
return true
end
end
Expand Down
3 changes: 2 additions & 1 deletion spec/02-integration/18-hybrid_rpc/04-concentrator_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ local function obtain_dp_node_id() -- luacheck: ignore
end


for _, inc_sync in ipairs { "on", "off" } do
-- we need incremental sync to verify rpc
for _, inc_sync in ipairs { "on" } do
for _, strategy in helpers.each_strategy() do
describe("Hybrid Mode RPC over DB concentrator #" .. strategy .. " inc_sync=" .. inc_sync, function()

Expand Down

0 comments on commit 9033a00

Please sign in to comment.