Skip to content

Commit

Permalink
add a test to show that different endpoints will be chosen randomly
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxuanzi committed Jan 30, 2023
1 parent fb5cb48 commit c009c92
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions t/plugin/elasticsearch-logger.t
Original file line number Diff line number Diff line change
Expand Up @@ -551,3 +551,32 @@ PTQvJEaPcNOXcOHeErC0XQ==
}
--- response_body
passed
=== TEST 14: to show that different endpoints will be chosen randomly
--- config
location /t {
content_by_lua_block {
local t = require("lib.test_admin").test
for i = 1, 10 do
local code, body = t('/hello', ngx.HTTP_GET)
ngx.say("code: ", code)
end
}
}
--- response_body
code: 200
code: 200
code: 200
code: 200
code: 200
code: 200
code: 200
code: 200
code: 200
code: 200
--- error_log
http://127.0.0.1:9200/_bulk
http://127.0.0.1:9201/_bulk

0 comments on commit c009c92

Please sign in to comment.