diff --git a/t/plugin/grpc-transcode-reload-bugfix.t b/t/plugin/grpc-transcode-reload-bugfix.t index 7eee56f16f8f..556b2cad2f9a 100644 --- a/t/plugin/grpc-transcode-reload-bugfix.t +++ b/t/plugin/grpc-transcode-reload-bugfix.t @@ -34,7 +34,7 @@ add_block_preprocessor(sub { close_cnt = 0 core.config.new = function(key, opts) local obj, err = orig_new(key, opts) - if key == "/protos" then + if key == "/proto" then local orig_close = obj.close obj.close = function(...) core.log.warn("call config close") diff --git a/t/plugin/request-id-reload-bugfix.t b/t/plugin/request-id-reload-bugfix.t index 71775e7d9b62..1b4bb5fe1f1a 100644 --- a/t/plugin/request-id-reload-bugfix.t +++ b/t/plugin/request-id-reload-bugfix.t @@ -33,6 +33,12 @@ add_block_preprocessor(sub { local orig_new = core.etcd.new core.etcd.new = function(...) local cli, prefix = orig_new(...) + -- in 2.15.x, there is an extra call in init_worker phase + -- so when backporting this fix, we need to filter out the + -- extra call in the test + if ngx.get_phase() ~= "timer" then + return cli, prefix + end cli.keepalive = function(...) return false, "test error" end @@ -61,6 +67,9 @@ __DATA__ === TEST 1: unregister timer when etcd keepalive failed --- yaml_config +apisix: + node_listen: 1984 + admin_key: null plugins: - request-id plugin_attr: