From 4011cfb6f07a91e42979716029b46189b5cfb3b4 Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Wed, 3 Jan 2024 19:12:56 -0800 Subject: [PATCH] chore(ci) fix Large CI unit tests in HUP mode --- t/03-proxy_wasm/007-on_http_instance_isolation.t | 7 ++++--- t/03-proxy_wasm/hfuncs/120-proxy_properties_get_host.t | 4 ++-- t/03-proxy_wasm/hfuncs/123-proxy_properties_set_host.t | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/t/03-proxy_wasm/007-on_http_instance_isolation.t b/t/03-proxy_wasm/007-on_http_instance_isolation.t index 7d6e4b4e1..07b9e0912 100644 --- a/t/03-proxy_wasm/007-on_http_instance_isolation.t +++ b/t/03-proxy_wasm/007-on_http_instance_isolation.t @@ -7,6 +7,7 @@ use t::TestWasm; skip_no_debug(); plan_tests(8); +no_shuffle(); run_tests(); __DATA__ @@ -71,7 +72,6 @@ qr/\A\*\d+ .*? filter reusing instance[^#*]* === TEST 2: proxy_wasm - trap with none isolation mode Should recycle the global instance when trapped. --- valgrind ---- load_nginx_modules: ngx_http_echo_module --- wasm_modules: hostcalls --- config proxy_wasm_isolation none; @@ -118,6 +118,7 @@ qr/\A\*\d+ .*? filter new instance[^#*]* === TEST 3: proxy_wasm - stream isolation mode should use an instance per stream +req0 might free an instance from the previous test in HUP mode. --- valgrind --- wasm_modules: hostcalls --- config @@ -133,10 +134,10 @@ should use an instance per stream --- ignore_response_body --- grep_error_log eval: qr/(\*\d+.*?(resuming|new instance|reusing|finalizing|freeing|trap in)|#\d+ on_(configure|vm_start)).*/ --- grep_error_log_out eval -[qr/#0 on_vm_start[^#*]* +[qr/(\*\d+ .*? freeing "hostcalls" instance in "main" vm \(.*?\)[^#*]*)?#0 on_vm_start[^#*]* #0 on_configure[^#*]* #0 on_vm_start[^#*]* -#0 on_configure[^#*]* +#0 on_configure[^#*]*(\*\d+ .*? freeing "hostcalls" instance in "main" vm \(.*?\)[^#*]*)? \*\d+ .*? filter new instance[^#*]* #0 on_configure[^#*]* \*\d+ .*? filter reusing instance[^#*]* diff --git a/t/03-proxy_wasm/hfuncs/120-proxy_properties_get_host.t b/t/03-proxy_wasm/hfuncs/120-proxy_properties_get_host.t index 15887b50e..d80d4ebe7 100644 --- a/t/03-proxy_wasm/hfuncs/120-proxy_properties_get_host.t +++ b/t/03-proxy_wasm/hfuncs/120-proxy_properties_get_host.t @@ -132,7 +132,7 @@ qr/\[info\] .*? property not found: was,/ --- load_nginx_modules: ngx_http_echo_module --- config location /t { - proxy_wasm hostcalls 'tick_period=100 \ + proxy_wasm hostcalls 'tick_period=500 \ on_tick=log_property \ name=wasmx.my_var'; echo_sleep 0.150; @@ -156,7 +156,7 @@ qr/\[info\] .*? property not found: was,/ location /t { proxy_wasm_isolation stream; - proxy_wasm hostcalls 'tick_period=100 \ + proxy_wasm hostcalls 'tick_period=500 \ on_tick=log_property \ name=wasmx.my_var'; echo_sleep 0.150; diff --git a/t/03-proxy_wasm/hfuncs/123-proxy_properties_set_host.t b/t/03-proxy_wasm/hfuncs/123-proxy_properties_set_host.t index 584cdabae..285060dd6 100644 --- a/t/03-proxy_wasm/hfuncs/123-proxy_properties_set_host.t +++ b/t/03-proxy_wasm/hfuncs/123-proxy_properties_set_host.t @@ -147,7 +147,7 @@ ngx_http_* calls. set $my_var 123; location /t { - proxy_wasm hostcalls 'tick_period=100 \ + proxy_wasm hostcalls 'tick_period=500 \ on_tick=set_property \ name=wasmx.my_var \ show_old=false \ @@ -179,7 +179,7 @@ ngx_http_* calls. location /t { proxy_wasm_isolation stream; - proxy_wasm hostcalls 'tick_period=100 \ + proxy_wasm hostcalls 'tick_period=500 \ on_tick=set_property \ name=wasmx.my_var \ show_old=false \