This is an automated email from the ASF dual-hosted git repository.
monkeydluffy 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 e3b8fd7d1 fix(ci): regex does not match err.log for xrpc (#9845)
e3b8fd7d1 is described below
commit e3b8fd7d149f7cab414c5b5369c3d1a3ebacd2e3
Author: Xin Rong <[email protected]>
AuthorDate: Mon Jul 17 09:36:22 2023 +0800
fix(ci): regex does not match err.log for xrpc (#9845)
---
t/xrpc/redis2.t | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/t/xrpc/redis2.t b/t/xrpc/redis2.t
index 7e378f836..076a406b4 100644
--- a/t/xrpc/redis2.t
+++ b/t/xrpc/redis2.t
@@ -16,6 +16,8 @@
#
use t::APISIX;
+log_level("warn");
+
my $nginx_binary = $ENV{'TEST_NGINX_BINARY'} || 'nginx';
my $version = eval { `$nginx_binary -V 2>&1` };
@@ -117,7 +119,7 @@ passed
{
name = "syslog",
filter = {
- {"rpc_time", ">=", 0.01},
+ {"rpc_time", ">=", 0.001},
},
conf = {
host = "127.0.0.1",
@@ -149,6 +151,7 @@ passed
=== TEST 3: verify the data received by the log server
+--- stream_conf_enable
--- config
location /t {
content_by_lua_block {
@@ -190,11 +193,10 @@ passed
hmset animals: OK
hmget animals: barkmeow
ping: pong
---- stream_conf_enable
--- wait: 1
--- grep_error_log eval
-qr/message received:.*\"redis_cmd_line\":[^,]+/
+qr/message received:.*\"redis_cmd_line\":[^}|^,]+/
--- grep_error_log_out eval
-[qr/message received:.*\"redis_cmd_line\":\"hmset animals dog bark cat meow\"/,
-qr/message received:.*\"redis_cmd_line\":\"hmget animals dog cat\"/,
-qr/message received:.*\"redis_cmd_line\":\"ping\"/]
+qr{message received:.*\"redis_cmd_line\":\"hmset animals dog bark cat
meow\"(?s).*
+message received:.*\"redis_cmd_line\":\"hmget animals dog cat\"(?s).*
+message received:.*\"redis_cmd_line\":\"ping\"}