File tree 2 files changed +33
-2
lines changed
2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ install:
60
60
- git clone https://github.com/openresty/openresty.git ../openresty
61
61
- git clone https://github.com/openresty/openresty-devel-utils.git
62
62
- git clone https://github.com/simpl/ngx_devel_kit.git ../ndk-nginx-module
63
- - git clone https://github.com/openresty /lua-nginx-module.git ../lua-nginx-module
63
+ - git clone -b proc_wait_timeout_fix https://github.com/spacewander /lua-nginx-module.git ../lua-nginx-module
64
64
- git clone https://github.com/openresty/no-pool-nginx.git ../no-pool-nginx
65
65
- git clone https://github.com/openresty/echo-nginx-module.git ../echo-nginx-module
66
66
- git clone https://github.com/openresty/lua-resty-lrucache.git
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use t::TestCore;
4
4
5
5
repeat_each(2);
6
6
7
- plan tests => repeat_each() * (blocks() * 3 + 16 );
7
+ plan tests => repeat_each() * (blocks() * 3 + 17 );
8
8
9
9
add_block_preprocessor(sub {
10
10
my $block = shift ;
@@ -1462,3 +1462,34 @@ ok
1462
1462
qr/\[notice\] .* signal \d+ \(SIGCHLD\) received from \d+/
1463
1463
--- no_error_log
1464
1464
[error]
1465
+
1466
+
1467
+
1468
+ === TEST 42: return nil plus string 'timeout' when waiting process timed out
1469
+ --- config
1470
+ location = /t {
1471
+ content_by_lua_block {
1472
+ local ngx_pipe = require "ngx.pipe"
1473
+ local proc, err = ngx_pipe.spawn({"sleep", "10s"})
1474
+ if not proc then
1475
+ ngx.say(err)
1476
+ return
1477
+ end
1478
+
1479
+ proc:set_timeouts(nil, nil, nil, 10)
1480
+ local ok, err = proc:wait()
1481
+ if not ok then
1482
+ ngx.say(ok)
1483
+ ngx.say(err)
1484
+ else
1485
+ ngx.say("ok")
1486
+ end
1487
+ }
1488
+ }
1489
+ --- response_body
1490
+ nil
1491
+ timeout
1492
+ --- no_error_log
1493
+ [error]
1494
+ --- error_log
1495
+ lua pipe wait process:
You can’t perform that action at this time.
0 commit comments