(This page was automatically generated by the tools in the opsboy project on 15:08:01 28-Dec-2023 GMT.)

Detailed Test Report for lua-resty-core in linux i386 (h)

Summary

Commit Testing Time Unexpected
Failures
Expected
Failures
Files Tests Elapsed Time
12abf47c 2020-10-26 09:04:54 GMT 178 0 sec

LuaJIT

LuaJIT 2.1.0-beta3, commit 864c72e3

OpenSSL

OpenSSL 1.1.0j 20 Nov 2018 (running with OpenSSL 1.1.1h 22 Sep 2020)

Compilation Errors

Unexpected Failures

File Name Details
balancer-timeout.t TEST 6: set connect timeout to -1 - pattern "(?^:\[error\] .*? balancer_by_lua:4: bad connect timeout)" should match a line in error.log (req 0)
balancer-timeout.t TEST 6: set connect timeout to -1 - pattern "(?^:\[error\] .*? balancer_by_lua:4: bad connect timeout)" should match a line in error.log (req 1)
balancer-timeout.t TEST 9: set read timeout to -1 - pattern "(?^:\[error\] .*? balancer_by_lua:4: bad read timeout)" should match a line in error.log (req 0)
balancer-timeout.t TEST 9: set read timeout to -1 - pattern "(?^:\[error\] .*? balancer_by_lua:4: bad read timeout)" should match a line in error.log (req 1)
balancer-timeout.t TEST 1: set_timeouts - status code ok got: '500'
expected: '200'
balancer-timeout.t TEST 1: set_timeouts - response_body - response is expected (repeated req 0, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'fake origin
'
balancer-timeout.t TEST 1: set_timeouts - grep_error_log_out (req 0) ''
doesn't match '(?^:\Aevent timer add: \d+: 1234:
event timer add: \d+: 5678:
event timer add: \d+: 7689:
\z)'
balancer-timeout.t TEST 1: set_timeouts - status code ok got: '500'
expected: '200'
balancer-timeout.t TEST 1: set_timeouts - response_body - response is expected (repeated req 1, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'fake origin
'
balancer-timeout.t TEST 1: set_timeouts - grep_error_log_out (req 1) ''
doesn't match '(?^:\Aevent timer add: \d+: 1234:
event timer add: \d+: 5678:
event timer add: \d+: 7689:
\z)'
balancer-timeout.t TEST 10: set_timeouts called in a wrong context - status code ok got: '500'
expected: '200'
balancer-timeout.t TEST 10: set_timeouts called in a wrong context - response_body - response is expected (repeated req 0, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'failed to call: no upstream found
'
balancer-timeout.t TEST 10: set_timeouts called in a wrong context - pattern "[error]" should not match any line in error.log but matches line "2020/10/26 13:34:24 [error] 23794\#0: *70 lua entry thread aborted: runtime error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required" (req 0) stack traceback:
coroutine 0:
[C]: in function 'error'
./lib/resty/core/base.lua:24: in main chunk
[C]: in function 'require'
./lib/ngx/balancer.lua:4: in main chunk
[C]: in function 'require'
content_by_lua(nginx.conf:49):2: in main chunk, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
2020/10/26 13:34:24 [debug] 23794\#0: *70 lua request cleanup: forcible=0
'
balancer-timeout.t TEST 10: set_timeouts called in a wrong context - status code ok got: '500'
expected: '200'
balancer-timeout.t TEST 10: set_timeouts called in a wrong context - response_body - response is expected (repeated req 1, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'failed to call: no upstream found
'
balancer-timeout.t TEST 10: set_timeouts called in a wrong context - pattern "[error]" should not match any line in error.log but matches line "2020/10/26 13:34:25 [error] 23794\#0: *71 lua entry thread aborted: runtime error: content_by_lua(nginx.conf:49):2: loop or previous error loading module 'ngx.balancer'" (req 1) stack traceback:
coroutine 0:
[C]: in function 'require'
content_by_lua(nginx.conf:49):2: in main chunk, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
2020/10/26 13:34:25 [debug] 23794\#0: *71 lua request cleanup: forcible=0
2020/10/26 13:34:25 [debug] 23794\#0: *71 http finalize request: 500, "/t?" a:1, c:1
2020/10/26 13:34:25 [debug] 23794\#0: *71 http special response: 500, "/t?"
2020/10/26 13:34:25 [debug] 23794\#0: *71 http set discard body
2020/10/26 13:34:25 [debug] 23794\#0: *71 lua capture header filter, uri "/t"
'
balancer-timeout.t TEST 5: set connect timeout to 0 - pattern "(?^:\[error\] .*? balancer_by_lua:4: bad connect timeout)" should match a line in error.log (req 0)
balancer-timeout.t TEST 5: set connect timeout to 0 - pattern "(?^:\[error\] .*? balancer_by_lua:4: bad connect timeout)" should match a line in error.log (req 1)
balancer-timeout.t TEST 4: set_timeouts (nil read timeout) - status code ok got: '500'
expected: '200'
balancer-timeout.t TEST 4: set_timeouts (nil read timeout) - response_body - response is expected (repeated req 0, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'fake origin
'
balancer-timeout.t TEST 4: set_timeouts (nil read timeout) - grep_error_log_out (req 0) ''
doesn't match '(?^:\Aevent timer add: \d+: 1234:
event timer add: \d+: 5678:
event timer add: \d+: 7689:
\z)'
balancer-timeout.t TEST 4: set_timeouts (nil read timeout) - status code ok got: '500'
expected: '200'
balancer-timeout.t TEST 4: set_timeouts (nil read timeout) - response_body - response is expected (repeated req 1, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'fake origin
'
balancer-timeout.t TEST 4: set_timeouts (nil read timeout) - grep_error_log_out (req 1) ''
doesn't match '(?^:\Aevent timer add: \d+: 1234:
event timer add: \d+: 5678:
event timer add: \d+: 7689:
\z)'
balancer-timeout.t TEST 8: set send timeout to -1 - pattern "(?^:\[error\] .*? balancer_by_lua:4: bad send timeout)" should match a line in error.log (req 0)
balancer-timeout.t TEST 8: set send timeout to -1 - pattern "(?^:\[error\] .*? balancer_by_lua:4: bad send timeout)" should match a line in error.log (req 1)
balancer-timeout.t TEST 3: set_timeouts (nil send timeout) - status code ok got: '500'
expected: '200'
balancer-timeout.t TEST 3: set_timeouts (nil send timeout) - response_body - response is expected (repeated req 0, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'fake origin
'
balancer-timeout.t TEST 3: set_timeouts (nil send timeout) - grep_error_log_out (req 0) ''
doesn't match '(?^:\Aevent timer add: \d+: 1234:
event timer add: \d+: 5678:
event timer add: \d+: 7689:
\z)'
balancer-timeout.t TEST 3: set_timeouts (nil send timeout) - status code ok got: '500'
expected: '200'
balancer-timeout.t TEST 3: set_timeouts (nil send timeout) - response_body - response is expected (repeated req 1, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'fake origin
'
balancer-timeout.t TEST 3: set_timeouts (nil send timeout) - grep_error_log_out (req 1) ''
doesn't match '(?^:\Aevent timer add: \d+: 1234:
event timer add: \d+: 5678:
event timer add: \d+: 7689:
\z)'
balancer-timeout.t TEST 7: set send timeout to 0 - pattern "(?^:\[error\] .*? balancer_by_lua:4: bad send timeout)" should match a line in error.log (req 0)
balancer-timeout.t TEST 7: set send timeout to 0 - pattern "(?^:\[error\] .*? balancer_by_lua:4: bad send timeout)" should match a line in error.log (req 1)
balancer-timeout.t TEST 2: set_timeouts (nil connect timeout) - status code ok got: '500'
expected: '200'
balancer-timeout.t TEST 2: set_timeouts (nil connect timeout) - response_body - response is expected (repeated req 0, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'fake origin
'
balancer-timeout.t TEST 2: set_timeouts (nil connect timeout) - grep_error_log_out (req 0) ''
doesn't match '(?^:\Aevent timer add: \d+: 1234:
event timer add: \d+: 5678:
event timer add: \d+: 7689:
\z)'
balancer-timeout.t TEST 2: set_timeouts (nil connect timeout) - status code ok got: '500'
expected: '200'
balancer-timeout.t TEST 2: set_timeouts (nil connect timeout) - response_body - response is expected (repeated req 1, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'fake origin
'
balancer-timeout.t TEST 2: set_timeouts (nil connect timeout) - grep_error_log_out (req 1) ''
doesn't match '(?^:\Aevent timer add: \d+: 1234:
event timer add: \d+: 5678:
event timer add: \d+: 7689:
\z)'
balancer-timeout.t TEST 11: set_timeouts called with a non-numerical parameter - pattern "(?^:\[error\] .*? bad connect timeout)" should match a line in error.log (req 0)
balancer-timeout.t TEST 11: set_timeouts called with a non-numerical parameter - pattern "(?^:\[error\] .*? bad connect timeout)" should match a line in error.log (req 1)
balancer.t TEST 19: recreate upstream module requests with header change - status code ok got: '500'
expected: '200'
balancer.t TEST 19: recreate upstream module requests with header change - response_body - response is expected (repeated req 0, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'value is: second'
balancer.t TEST 19: recreate upstream module requests with header change - pattern "connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1" should match a line in error.log (req 0)
balancer.t TEST 19: recreate upstream module requests with header change - status code ok got: '500'
expected: '200'
balancer.t TEST 19: recreate upstream module requests with header change - response_body - response is expected (repeated req 1, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'value is: second'
balancer.t TEST 19: recreate upstream module requests with header change - pattern "connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1" should match a line in error.log (req 1)
balancer.t TEST 5: get last peer failure status (404) - status code ok got: '500'
expected: '404'
balancer.t TEST 5: get last peer failure status (404) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:404 Not Found)'
balancer.t TEST 5: get last peer failure status (404) - grep_error_log_out (req 0) @@ -1,3 +0,0 @@
-last peer failure: nil nil
-last peer failure: next 404
-last peer failure: next 404
'
balancer.t TEST 5: get last peer failure status (404) - status code ok got: '500'
expected: '404'
balancer.t TEST 5: get last peer failure status (404) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:404 Not Found)'
balancer.t TEST 5: get last peer failure status (404) - grep_error_log_out (req 1) @@ -1,3 +0,0 @@
-last peer failure: nil nil
-last peer failure: next 404
-last peer failure: next 404
'
balancer.t TEST 12: set_current_peer called in a wrong context - pattern "(?^:\[error\] .*? log_by_lua.*? failed to call: API disabled in the current context)" should match a line in error.log (req 0)
balancer.t TEST 12: set_current_peer called in a wrong context - pattern "(?^:\[error\] .*? log_by_lua.*? failed to call: API disabled in the current context)" should match a line in error.log (req 1)
balancer.t TEST 16: https (keepalive) - status code ok got: '500'
expected: '200'
balancer.t TEST 16: https (keepalive) - response_body - response is expected (repeated req 0, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'ok'
balancer.t TEST 16: https (keepalive) - grep_error_log_out (req 0) got: ''
expected: 'hello from balancer by lua!
'
balancer.t TEST 16: https (keepalive) - pattern "[error]" should not match any line in error.log but matches line "2020/10/26 13:35:15 [error] 24076\#0: *77 failed to run balancer_by_lua*: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required" (req 0) stack traceback:
[C]: in function 'error'
./lib/resty/core/base.lua:24: in main chunk
[C]: in function 'require'
./lib/ngx/balancer.lua:4: in main chunk
[C]: in function 'require'
balancer_by_lua:2: in main chunk while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
2020/10/26 13:35:15 [debug] 24076\#0: *77 http upstream connect: -1
2020/10/26 13:35:15 [debug] 24076\#0: *77 finalize http upstream request: 500
'
balancer.t TEST 16: https (keepalive) - status code ok got: '500'
expected: '200'
balancer.t TEST 16: https (keepalive) - response_body - response is expected (repeated req 1, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'ok'
balancer.t TEST 16: https (keepalive) - grep_error_log_out (req 1) got: ''
expected: 'hello from balancer by lua!
'
balancer.t TEST 16: https (keepalive) - pattern "[error]" should not match any line in error.log but matches line "2020/10/26 13:35:15 [error] 24076\#0: *78 failed to run balancer_by_lua*: balancer_by_lua:2: loop or previous error loading module 'ngx.balancer'" (req 1) stack traceback:
[C]: in function 'require'
balancer_by_lua:2: in main chunk while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
2020/10/26 13:35:15 [debug] 24076\#0: *78 http upstream connect: -1
2020/10/26 13:35:15 [debug] 24076\#0: *78 finalize http upstream request: 500
2020/10/26 13:35:15 [debug] 24076\#0: *78 finalize http proxy request
2020/10/26 13:35:15 [debug] 24076\#0: *78 http finalize request: 500, "/t?" a:1, c:2
2020/10/26 13:35:15 [debug] 24076\#0: *78 http special response: 500, "/t?"
2020/10/26 13:35:15 [debug] 24076\#0: *78 malloc: 08CBE930:52
'
balancer.t TEST 10: keepalive before balancer - status code ok got: '500'
expected: '502'
balancer.t TEST 10: keepalive before balancer - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 10: keepalive before balancer - pattern "(?^:connect\(\) failed .*?, upstream: "http://127\.0\.0\.3:12345/t")" should match a line in error.log (req 0)
balancer.t TEST 10: keepalive before balancer - status code ok got: '500'
expected: '502'
balancer.t TEST 10: keepalive before balancer - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 10: keepalive before balancer - pattern "(?^:connect\(\) failed .*?, upstream: "http://127\.0\.0\.3:12345/t")" should match a line in error.log (req 1)
balancer.t TEST 8: get last peer failure status (connect failed) - status code ok got: '500'
expected: '502'
balancer.t TEST 8: get last peer failure status (connect failed) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 8: get last peer failure status (connect failed) - grep_error_log_out (req 0) @@ -1,3 +0,0 @@
-last peer failure: nil nil
-last peer failure: failed 502
-last peer failure: failed 502
'
balancer.t TEST 8: get last peer failure status (connect failed) - status code ok got: '500'
expected: '502'
balancer.t TEST 8: get last peer failure status (connect failed) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 8: get last peer failure status (connect failed) - grep_error_log_out (req 1) @@ -1,3 +0,0 @@
-last peer failure: nil nil
-last peer failure: failed 502
-last peer failure: failed 502
'
balancer.t TEST 2: set current peer & next upstream (3 tries) - status code ok got: '500'
expected: '502'
balancer.t TEST 2: set current peer & next upstream (3 tries) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 2: set current peer & next upstream (3 tries) - grep_error_log_out (req 0) ''
doesn't match '(?^:^(?:connect\(\) failed .*?, upstream: "http://127.0.0.3:12345/t"\n){3}$)'
balancer.t TEST 2: set current peer & next upstream (3 tries) - status code ok got: '500'
expected: '502'
balancer.t TEST 2: set current peer & next upstream (3 tries) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 2: set current peer & next upstream (3 tries) - grep_error_log_out (req 1) ''
doesn't match '(?^:^(?:connect\(\) failed .*?, upstream: "http://127.0.0.3:12345/t"\n){3}$)'
balancer.t TEST 1: set current peer (separate addr and port) - status code ok got: '500'
expected: '502'
balancer.t TEST 1: set current peer (separate addr and port) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 1: set current peer (separate addr and port) - pattern "(?^:connect\(\) failed .*?, upstream: "http://127\.0\.0\.3:12345/t")" should match a line in error.log (req 0)
balancer.t TEST 1: set current peer (separate addr and port) - status code ok got: '500'
expected: '502'
balancer.t TEST 1: set current peer (separate addr and port) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 1: set current peer (separate addr and port) - pattern "(?^:connect\(\) failed .*?, upstream: "http://127\.0\.0\.3:12345/t")" should match a line in error.log (req 1)
balancer.t TEST 9: set current peer (port embedded in addr) - status code ok got: '500'
expected: '502'
balancer.t TEST 9: set current peer (port embedded in addr) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 9: set current peer (port embedded in addr) - pattern "(?^:connect\(\) failed .*?, upstream: "http://127\.0\.0\.3:12345/t")" should match a line in error.log (req 0)
balancer.t TEST 9: set current peer (port embedded in addr) - status code ok got: '500'
expected: '502'
balancer.t TEST 9: set current peer (port embedded in addr) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 9: set current peer (port embedded in addr) - pattern "(?^:connect\(\) failed .*?, upstream: "http://127\.0\.0\.3:12345/t")" should match a line in error.log (req 1)
balancer.t TEST 6: get last peer failure status (500) - grep_error_log_out (req 0) @@ -1,3 +0,0 @@
-last peer failure: nil nil
-last peer failure: failed 500
-last peer failure: failed 500
'
balancer.t TEST 6: get last peer failure status (500) - grep_error_log_out (req 1) @@ -1,3 +0,0 @@
-last peer failure: nil nil
-last peer failure: failed 500
-last peer failure: failed 500
'
balancer.t TEST 7: get last peer failure status (503) - status code ok got: '500'
expected: '503'
balancer.t TEST 7: get last peer failure status (503) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:503 Service Temporarily Unavailable)'
balancer.t TEST 7: get last peer failure status (503) - grep_error_log_out (req 0) ''
doesn't match '(?^:\Alast peer failure: nil nil
last peer failure: failed 50[23]
last peer failure: failed 50[23]
\z)'
balancer.t TEST 7: get last peer failure status (503) - status code ok got: '500'
expected: '503'
balancer.t TEST 7: get last peer failure status (503) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:503 Service Temporarily Unavailable)'
balancer.t TEST 7: get last peer failure status (503) - grep_error_log_out (req 1) ''
doesn't match '(?^:\Alast peer failure: nil nil
last peer failure: failed 50[23]
last peer failure: failed 50[23]
\z)'
balancer.t TEST 11: keepalive after balancer - response_body - response is expected (repeated req 0, req 0) got: ''
expected: 'hello keepalive!
'
balancer.t TEST 11: keepalive after balancer - grep_error_log_out (req 0) @@ -1,5 +0,0 @@
-free keepalive peer: saving connection
-get keepalive peer: using connection
-free keepalive peer: saving connection
-get keepalive peer: using connection
-free keepalive peer: saving connection
'
balancer.t TEST 11: keepalive after balancer - response_body - response is expected (repeated req 1, req 0) got: ''
expected: 'hello keepalive!
'
balancer.t TEST 11: keepalive after balancer - grep_error_log_out (req 1) @@ -1,6 +0,0 @@
-get keepalive peer: using connection
-free keepalive peer: saving connection
-get keepalive peer: using connection
-free keepalive peer: saving connection
-get keepalive peer: using connection
-free keepalive peer: saving connection
'
balancer.t TEST 3: set current peer & next upstream (no retries) - status code ok got: '500'
expected: '502'
balancer.t TEST 3: set current peer & next upstream (no retries) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 3: set current peer & next upstream (no retries) - grep_error_log_out (req 0) ''
doesn't match '(?^:^(?:connect\(\) failed .*?, upstream: "http://127.0.0.3:12345/t"\n){1}$)'
balancer.t TEST 3: set current peer & next upstream (no retries) - status code ok got: '500'
expected: '502'
balancer.t TEST 3: set current peer & next upstream (no retries) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 3: set current peer & next upstream (no retries) - grep_error_log_out (req 1) ''
doesn't match '(?^:^(?:connect\(\) failed .*?, upstream: "http://127.0.0.3:12345/t"\n){1}$)'
balancer.t TEST 17: https (no keepalive) - status code ok got: '500'
expected: '200'
balancer.t TEST 17: https (no keepalive) - response_body - response is expected (repeated req 0, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'ok'
balancer.t TEST 17: https (no keepalive) - grep_error_log_out (req 0) got: ''
expected: 'hello from balancer by lua!
'
balancer.t TEST 17: https (no keepalive) - pattern "[error]" should not match any line in error.log but matches line "2020/10/26 13:35:32 [error] 24356\#0: *317 failed to run balancer_by_lua*: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required" (req 0) stack traceback:
[C]: in function 'error'
./lib/resty/core/base.lua:24: in main chunk
[C]: in function 'require'
./lib/ngx/balancer.lua:4: in main chunk
[C]: in function 'require'
balancer_by_lua:2: in main chunk while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
2020/10/26 13:35:32 [debug] 24356\#0: *317 http upstream connect: -1
2020/10/26 13:35:32 [debug] 24356\#0: *317 finalize http upstream request: 500
'
balancer.t TEST 17: https (no keepalive) - status code ok got: '500'
expected: '200'
balancer.t TEST 17: https (no keepalive) - response_body - response is expected (repeated req 1, req 0) got: '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
expected: 'ok'
balancer.t TEST 17: https (no keepalive) - grep_error_log_out (req 1) got: ''
expected: 'hello from balancer by lua!
'
balancer.t TEST 17: https (no keepalive) - pattern "[error]" should not match any line in error.log but matches line "2020/10/26 13:35:32 [error] 24356\#0: *318 failed to run balancer_by_lua*: balancer_by_lua:2: loop or previous error loading module 'ngx.balancer'" (req 1) stack traceback:
[C]: in function 'require'
balancer_by_lua:2: in main chunk while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
2020/10/26 13:35:32 [debug] 24356\#0: *318 http upstream connect: -1
2020/10/26 13:35:32 [debug] 24356\#0: *318 finalize http upstream request: 500
2020/10/26 13:35:32 [debug] 24356\#0: *318 finalize http proxy request
2020/10/26 13:35:32 [debug] 24356\#0: *318 http finalize request: 500, "/t?" a:1, c:2
2020/10/26 13:35:32 [debug] 24356\#0: *318 http special response: 500, "/t?"
2020/10/26 13:35:32 [debug] 24356\#0: *318 malloc: 08CC7D58:52
'
balancer.t TEST 15: hot loop when proxy_upstream_next error is hit and keepalive is used. - grep_error_log_out (req 0) @@ -1,3 +0,0 @@
-hello from balancer by lua!
-hello from balancer by lua!
-hello from balancer by lua!
'
balancer.t TEST 15: hot loop when proxy_upstream_next error is hit and keepalive is used. - pattern "(?^:\[error] .*? upstream prematurely closed connection while reading response header from upstream)" should match a line in error.log (req 0)
balancer.t TEST 15: hot loop when proxy_upstream_next error is hit and keepalive is used. - grep_error_log_out (req 1) @@ -1,3 +0,0 @@
-hello from balancer by lua!
-hello from balancer by lua!
-hello from balancer by lua!
'
balancer.t TEST 15: hot loop when proxy_upstream_next error is hit and keepalive is used. - pattern "(?^:\[error] .*? upstream prematurely closed connection while reading response header from upstream)" should match a line in error.log (req 1)
balancer.t TEST 4: set current peer & next upstream (3 tries exceeding the limit) - status code ok got: '500'
expected: '502'
balancer.t TEST 4: set current peer & next upstream (3 tries exceeding the limit) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 4: set current peer & next upstream (3 tries exceeding the limit) - grep_error_log_out (req 0) ''
doesn't match '(?^:^(?:connect\(\) failed .*?, upstream: "http://127.0.0.3:12345/t"\n){2}$)'
balancer.t TEST 4: set current peer & next upstream (3 tries exceeding the limit) - pattern "set more tries: reduced tries due to limit" should match a line in error.log (req 0)
balancer.t TEST 4: set current peer & next upstream (3 tries exceeding the limit) - status code ok got: '500'
expected: '502'
balancer.t TEST 4: set current peer & next upstream (3 tries exceeding the limit) - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 4: set current peer & next upstream (3 tries exceeding the limit) - grep_error_log_out (req 1) ''
doesn't match '(?^:^(?:connect\(\) failed .*?, upstream: "http://127.0.0.3:12345/t"\n){2}$)'
balancer.t TEST 4: set current peer & next upstream (3 tries exceeding the limit) - pattern "set more tries: reduced tries due to limit" should match a line in error.log (req 1)
balancer.t TEST 13: get_last_failure called in a wrong context - pattern "(?^:\[error\] .*? log_by_lua.*? failed to call: API disabled in the current context)" should match a line in error.log (req 0)
balancer.t TEST 13: get_last_failure called in a wrong context - pattern "(?^:\[error\] .*? log_by_lua.*? failed to call: API disabled in the current context)" should match a line in error.log (req 1)
balancer.t TEST 14: set_more_tries called in a wrong context - pattern "(?^:\[error\] .*? log_by_lua.*? failed to call: API disabled in the current context)" should match a line in error.log (req 0)
balancer.t TEST 14: set_more_tries called in a wrong context - pattern "(?^:\[error\] .*? log_by_lua.*? failed to call: API disabled in the current context)" should match a line in error.log (req 1)
balancer.t TEST 18: test ngx.var.upstream_addr after using more than one set_current_peer - status code ok got: '500'
expected: '502'
balancer.t TEST 18: test ngx.var.upstream_addr after using more than one set_current_peer - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 18: test ngx.var.upstream_addr after using more than one set_current_peer - pattern "[lua] log_by_lua(nginx.conf:59):2: ngx.var.upstream_addr is 127.0.0.3:12345, 127.0.0.3:12346" should match a line in error.log (req 0)
balancer.t TEST 18: test ngx.var.upstream_addr after using more than one set_current_peer - status code ok got: '500'
expected: '502'
balancer.t TEST 18: test ngx.var.upstream_addr after using more than one set_current_peer - response_body_like - response is expected (<html> <head><title>500 Internal Server Error</title></head> <body> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx/1.15.8 (no pool)</center> </body> </html>) '<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.15.8 (no pool)</center>
</body>
</html>
'
doesn't match '(?^s:502 Bad Gateway)'
balancer.t TEST 18: test ngx.var.upstream_addr after using more than one set_current_peer - pattern "[lua] log_by_lua(nginx.conf:59):2: ngx.var.upstream_addr is 127.0.0.3:12345, 127.0.0.3:12346" should match a line in error.log (req 1)
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
nginx: [error] init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.18 required
Bailout called. Further testing stopped: TEST 1: module size - Cannot start nginx using command "nginx -p /home/ec2-user/git/lua-resty-core/t/servroot/ -c /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf > /dev/null" (status code 256).

Expected Failures

(none)

Warnings

(none)

Go back to the index page.