Skip to content

Commit

Permalink
test clean
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Jan 12, 2025
1 parent ff2bc4d commit 596ecba
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions spec/02-integration/18-hybrid_rpc/06-batch-rpc_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,33 @@ for _, strategy in helpers.each_strategy() do

describe("batch works", function()
it("DP calls CP via batching", function()
local cp_logfile = nil
local dp_logfile = "servroot2/logs/error.log"

helpers.pwait_until(function()
assert.logfile("servroot2/logs/error.log").has.line(
assert.logfile(dp_logfile).has.line(
"[rpc] sent batch RPC call: 1", true)

assert.logfile().has.line(
assert.logfile(cp_logfile).has.line(
"[rpc] got batch RPC call: 1", true)
assert.logfile().has.line(
assert.logfile(cp_logfile).has.line(
"kong.test.batch called: world", true)

assert.logfile("servroot2/logs/error.log").has.line(
assert.logfile(dp_logfile).has.line(
"[rpc] got batch RPC call: 1", true)
assert.logfile("servroot2/logs/error.log").has.line(
assert.logfile(dp_logfile).has.line(
"kong.test.batch called: hello world", true)

assert.logfile("servroot2/logs/error.log").has.line(
assert.logfile(dp_logfile).has.line(
"[rpc] sent batch RPC call: 2", true)

assert.logfile().has.line(
assert.logfile(cp_logfile).has.line(
"[rpc] got batch RPC call: 2", true)
assert.logfile().has.line(
assert.logfile(cp_logfile).has.line(
"kong.test.batch called: kong", true)
assert.logfile().has.line(
assert.logfile(cp_logfile).has.line(
"kong.test.batch called: gateway", true)
assert.logfile().has.line(
assert.logfile(cp_logfile).has.line(
"[rpc] notification has no response", true)

return true
Expand Down

0 comments on commit 596ecba

Please sign in to comment.