This is an automated email from the ASF dual-hosted git repository. membphis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push: new 86e168e test: enable master-worker mode by default (#3927) 86e168e is described below commit 86e168e711713531eeafdd0a75682b150e0d0109 Author: 罗泽轩 <spacewander...@gmail.com> AuthorDate: Mon Mar 29 23:38:07 2021 +0800 test: enable master-worker mode by default (#3927) --- apisix/debug.lua | 2 +- apisix/plugins/skywalking.lua | 2 +- apisix/timers.lua | 2 +- t/APISIX.pm | 1 + t/admin/plugins-reload.t | 1 - t/config-center-yaml/plugin-configs.t | 1 - t/config-center-yaml/plugin.t | 2 ++ t/core/config_etcd.t | 1 + t/core/random.t | 1 - t/debug/debug-mode.t | 4 +--- t/discovery/dns/mix.t | 1 - t/discovery/dns/sanity.t | 1 - t/node/healthcheck-discovery.t | 1 - t/node/healthcheck-ipv6.t | 1 - t/node/healthcheck-multiple-worker.t | 1 - t/node/healthcheck-passive.t | 1 - t/node/healthcheck-stop-checker.t | 1 - t/node/healthcheck.t | 1 - t/node/healthcheck2.t | 1 - t/node/plugin-configs.t | 1 - t/node/route-delete.t | 5 +++++ t/node/upstream-discovery.t | 1 - t/plugin/error-log-logger.t | 1 - t/plugin/fault-injection2.t | 1 - t/plugin/node-status.t | 1 - t/plugin/server-info.t | 1 - t/plugin/traffic-split2.t | 1 - t/stream-node/random.t | 1 - 28 files changed, 13 insertions(+), 26 deletions(-) diff --git a/apisix/debug.lua b/apisix/debug.lua index b0ab038..8cd0135 100644 --- a/apisix/debug.lua +++ b/apisix/debug.lua @@ -201,7 +201,7 @@ end function _M.init_worker() - if process.type() ~= "worker" and process.type() ~= "single" then + if process.type() ~= "worker" then return end diff --git a/apisix/plugins/skywalking.lua b/apisix/plugins/skywalking.lua index cd66035..c0f74f3 100644 --- a/apisix/plugins/skywalking.lua +++ b/apisix/plugins/skywalking.lua @@ -102,7 +102,7 @@ end function _M.init() - if process.type() ~= "worker" and process.type() ~= "single" then + if process.type() ~= "worker" then return end diff --git a/apisix/timers.lua b/apisix/timers.lua index a08f651..b30c269 100644 --- a/apisix/timers.lua +++ b/apisix/timers.lua @@ -53,7 +53,7 @@ end local function is_privileged() - return process.type() == "privileged agent" or process.type() == "single" + return process.type() == "privileged agent" end diff --git a/t/APISIX.pm b/t/APISIX.pm index 2c96712..2182430 100644 --- a/t/APISIX.pm +++ b/t/APISIX.pm @@ -26,6 +26,7 @@ no_long_string(); no_shuffle(); no_root_location(); # avoid generated duplicate 'location /' worker_connections(128); +master_on(); my $apisix_home = $ENV{APISIX_HOME} || cwd(); my $nginx_binary = $ENV{'TEST_NGINX_BINARY'} || 'nginx'; diff --git a/t/admin/plugins-reload.t b/t/admin/plugins-reload.t index d0dc15a..e46b25a 100644 --- a/t/admin/plugins-reload.t +++ b/t/admin/plugins-reload.t @@ -22,7 +22,6 @@ no_root_location(); no_shuffle(); log_level("info"); workers(2); -master_on(); add_block_preprocessor(sub { my ($block) = @_; diff --git a/t/config-center-yaml/plugin-configs.t b/t/config-center-yaml/plugin-configs.t index 309388d..e7a22b7 100644 --- a/t/config-center-yaml/plugin-configs.t +++ b/t/config-center-yaml/plugin-configs.t @@ -20,7 +20,6 @@ repeat_each(1); log_level('info'); no_root_location(); no_shuffle(); -master_on(); add_block_preprocessor(sub { my ($block) = @_; diff --git a/t/config-center-yaml/plugin.t b/t/config-center-yaml/plugin.t index bcd4575..1a5d95d 100644 --- a/t/config-center-yaml/plugin.t +++ b/t/config-center-yaml/plugin.t @@ -77,6 +77,8 @@ qr/load\(\): new plugins/ --- grep_error_log_out load(): new plugins load(): new plugins +load(): new plugins +load(): new plugins diff --git a/t/core/config_etcd.t b/t/core/config_etcd.t index ec03aff..fbffc9f 100644 --- a/t/core/config_etcd.t +++ b/t/core/config_etcd.t @@ -258,3 +258,4 @@ qr/etcd auth failed/ etcd auth failed etcd auth failed etcd auth failed +etcd auth failed diff --git a/t/core/random.t b/t/core/random.t index 8d7d403..afadec0 100644 --- a/t/core/random.t +++ b/t/core/random.t @@ -17,7 +17,6 @@ use t::APISIX 'no_plan'; -master_on(); workers(4); repeat_each(1); no_long_string(); diff --git a/t/debug/debug-mode.t b/t/debug/debug-mode.t index d6a729d..87f3e19 100644 --- a/t/debug/debug-mode.t +++ b/t/debug/debug-mode.t @@ -43,9 +43,7 @@ __DATA__ GET /t --- response_body done ---- grep_error_log eval -qr/loaded plugin and sort by priority: [-\d]+ name: [\w-]+/ ---- grep_error_log_out +--- error_log loaded plugin and sort by priority: 11011 name: zipkin loaded plugin and sort by priority: 11010 name: request-id loaded plugin and sort by priority: 11000 name: fault-injection diff --git a/t/discovery/dns/mix.t b/t/discovery/dns/mix.t index 3c3eca6..46c1e16 100644 --- a/t/discovery/dns/mix.t +++ b/t/discovery/dns/mix.t @@ -20,7 +20,6 @@ BEGIN { use t::APISIX 'no_plan'; -master_on(); repeat_each(1); no_root_location(); no_shuffle(); diff --git a/t/discovery/dns/sanity.t b/t/discovery/dns/sanity.t index 753b9bb..9e4ed2a 100644 --- a/t/discovery/dns/sanity.t +++ b/t/discovery/dns/sanity.t @@ -16,7 +16,6 @@ # use t::APISIX 'no_plan'; -master_on(); repeat_each(1); no_root_location(); no_shuffle(); diff --git a/t/node/healthcheck-discovery.t b/t/node/healthcheck-discovery.t index 0d82c84..db9c623 100644 --- a/t/node/healthcheck-discovery.t +++ b/t/node/healthcheck-discovery.t @@ -17,7 +17,6 @@ use t::APISIX 'no_plan'; -master_on(); repeat_each(1); no_root_location(); no_shuffle(); diff --git a/t/node/healthcheck-ipv6.t b/t/node/healthcheck-ipv6.t index 99a8894..69e375a 100644 --- a/t/node/healthcheck-ipv6.t +++ b/t/node/healthcheck-ipv6.t @@ -26,7 +26,6 @@ BEGIN { use t::APISIX 'no_plan'; -master_on(); repeat_each(1); log_level('info'); no_root_location(); diff --git a/t/node/healthcheck-multiple-worker.t b/t/node/healthcheck-multiple-worker.t index 40a09e6..469eb22 100644 --- a/t/node/healthcheck-multiple-worker.t +++ b/t/node/healthcheck-multiple-worker.t @@ -26,7 +26,6 @@ BEGIN { use t::APISIX 'no_plan'; -master_on(); repeat_each(1); log_level('info'); no_root_location(); diff --git a/t/node/healthcheck-passive.t b/t/node/healthcheck-passive.t index 417041c..c554224 100644 --- a/t/node/healthcheck-passive.t +++ b/t/node/healthcheck-passive.t @@ -17,7 +17,6 @@ use t::APISIX 'no_plan'; -master_on(); repeat_each(1); log_level('info'); no_root_location(); diff --git a/t/node/healthcheck-stop-checker.t b/t/node/healthcheck-stop-checker.t index a706292..cf6281c 100644 --- a/t/node/healthcheck-stop-checker.t +++ b/t/node/healthcheck-stop-checker.t @@ -26,7 +26,6 @@ BEGIN { use t::APISIX 'no_plan'; -master_on(); repeat_each(1); log_level('info'); no_root_location(); diff --git a/t/node/healthcheck.t b/t/node/healthcheck.t index 9f77a43..ff69f30 100644 --- a/t/node/healthcheck.t +++ b/t/node/healthcheck.t @@ -17,7 +17,6 @@ use t::APISIX 'no_plan'; -master_on(); repeat_each(1); log_level('info'); no_root_location(); diff --git a/t/node/healthcheck2.t b/t/node/healthcheck2.t index 1c802e2..1a083af 100644 --- a/t/node/healthcheck2.t +++ b/t/node/healthcheck2.t @@ -17,7 +17,6 @@ use t::APISIX 'no_plan'; -master_on(); repeat_each(1); log_level('info'); no_root_location(); diff --git a/t/node/plugin-configs.t b/t/node/plugin-configs.t index ab6c6e5..9808738 100644 --- a/t/node/plugin-configs.t +++ b/t/node/plugin-configs.t @@ -20,7 +20,6 @@ repeat_each(1); log_level('info'); no_root_location(); no_shuffle(); -master_on(); add_block_preprocessor(sub { my ($block) = @_; diff --git a/t/node/route-delete.t b/t/node/route-delete.t index 4e05ca8..981635d 100644 --- a/t/node/route-delete.t +++ b/t/node/route-delete.t @@ -134,8 +134,13 @@ done qr/\w+ (data by key: 103)/ --- grep_error_log_out insert data by key: 103 +insert data by key: 103 +update data by key: 103 update data by key: 103 delete data by key: 103 +delete data by key: 103 insert data by key: 103 +insert data by key: 103 +delete data by key: 103 delete data by key: 103 --- timeout: 30 diff --git a/t/node/upstream-discovery.t b/t/node/upstream-discovery.t index 6b51d7c..4416690 100644 --- a/t/node/upstream-discovery.t +++ b/t/node/upstream-discovery.t @@ -17,7 +17,6 @@ use t::APISIX 'no_plan'; -master_on(); repeat_each(1); no_root_location(); no_shuffle(); diff --git a/t/plugin/error-log-logger.t b/t/plugin/error-log-logger.t index 3ecbd0c..7c139a1 100644 --- a/t/plugin/error-log-logger.t +++ b/t/plugin/error-log-logger.t @@ -19,7 +19,6 @@ use t::APISIX 'no_plan'; repeat_each(1); no_long_string(); no_root_location(); -master_on(); add_block_preprocessor(sub { my ($block) = @_; diff --git a/t/plugin/fault-injection2.t b/t/plugin/fault-injection2.t index 841c956..84f9bbd 100644 --- a/t/plugin/fault-injection2.t +++ b/t/plugin/fault-injection2.t @@ -20,7 +20,6 @@ repeat_each(1); log_level('info'); no_root_location(); no_shuffle(); -master_on(); add_block_preprocessor(sub { my ($block) = @_; diff --git a/t/plugin/node-status.t b/t/plugin/node-status.t index 9e5a86d..4df3d3a 100644 --- a/t/plugin/node-status.t +++ b/t/plugin/node-status.t @@ -29,7 +29,6 @@ _EOC_ $block; }); -master_on(); repeat_each(1); no_long_string(); no_root_location(); diff --git a/t/plugin/server-info.t b/t/plugin/server-info.t index 1f7518b..2e382a5 100644 --- a/t/plugin/server-info.t +++ b/t/plugin/server-info.t @@ -29,7 +29,6 @@ BEGIN { use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); use t::APISIX 'no_plan'; -master_on(); repeat_each(1); no_long_string(); no_root_location(); diff --git a/t/plugin/traffic-split2.t b/t/plugin/traffic-split2.t index 071853a..3a95c4a 100644 --- a/t/plugin/traffic-split2.t +++ b/t/plugin/traffic-split2.t @@ -20,7 +20,6 @@ repeat_each(1); log_level('info'); no_root_location(); no_shuffle(); -master_on(); add_block_preprocessor(sub { my ($block) = @_; diff --git a/t/stream-node/random.t b/t/stream-node/random.t index 9f54414..3b60514 100644 --- a/t/stream-node/random.t +++ b/t/stream-node/random.t @@ -16,7 +16,6 @@ # use t::APISIX 'no_plan'; -master_on(); workers(4); log_level('info'); repeat_each(1);