kingluo commented on code in PR #9456:
URL: https://github.com/apache/apisix/pull/9456#discussion_r1191877838
##########
t/core/etcd-sync.t:
##########
@@ -22,65 +22,7 @@ run_tests;
__DATA__
-=== TEST 1: minus timeout to watch repeatedly
---- yaml_config
-deployment:
- role: traditional
- role_traditional:
- config_provider: etcd
- etcd:
- # this test requires the HTTP long pull as the gRPC stream is shared
and can't change
- # default timeout in the fly
- use_grpc: false
- admin:
- admin_key: null
---- config
- location /t {
- content_by_lua_block {
- local core = require("apisix.core")
- local t = require("lib.test_admin").test
-
- local consumers, _ = core.config.new("/consumers", {
- automatic = true,
- item_schema = core.schema.consumer,
- timeout = 0.2
- })
-
- ngx.sleep(0.6)
- local idx = consumers.prev_index
-
- local code, body = t('/apisix/admin/consumers',
- ngx.HTTP_PUT,
- [[{
- "username": "jobs",
- "plugins": {
- "basic-auth": {
- "username": "jobs",
- "password": "123456"
- }
- }
- }]])
-
- ngx.sleep(2)
- local new_idx = consumers.prev_index
- core.log.info("idx:", idx, " new_idx: ", new_idx)
- if new_idx > idx then
- ngx.say("prev_index updated")
- else
- ngx.say("prev_index not update")
- end
- }
- }
---- request
-GET /t
---- response_body
-prev_index updated
---- error_log eval
-qr/(create watch stream for key|cancel watch connection success)/
Review Comment:
deprecated test. etcd watch is a single long connection now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]