@@ -5,7 +5,7 @@ use Test::Nginx::Socket::Lua;
5
5
master_on();
6
6
repeat_each(2 );
7
7
8
- plan tests => repeat_each() * (blocks() * 2 + 7 );
8
+ plan tests => repeat_each() * (blocks() * 2 + 8 );
9
9
10
10
# log_level("warn");
11
11
no_long_string();
@@ -146,7 +146,8 @@ get val: 100
146
146
}
147
147
148
148
exit_worker_by_lua_block {
149
- ngx. log (ngx. NOTICE, " hello from exit worker by lua" )
149
+ local process = require " ngx.process"
150
+ ngx. log (ngx. INFO, " hello from exit worker by lua, process type: " , process. type())
150
151
}
151
152
-- - config
152
153
location = /t {
@@ -160,8 +161,8 @@ get val: 100
160
161
[
161
162
qr/ cache loader process \d+ exited/ ,
162
163
qr/ cache manager process \d+ exited/ ,
163
- qr/ hello from exit worker by lua$ / ,
164
- qr/ hello from exit worker by lua$ / ,
164
+ qr/ hello from exit worker by lua, process type : worker / ,
165
+ qr/ hello from exit worker by lua, process type : privileged agent / ,
165
166
qr/ privileged agent process \d+ exited/ ,
166
167
]
167
168
@@ -174,7 +175,8 @@ qr/privileged agent process \d+ exited/,
174
175
proxy_cache_path / tmp/ cache levels= 1 : 2 keys_zone= cache: 1 m;
175
176
176
177
exit_worker_by_lua_block {
177
- ngx. log (ngx. WARN, " hello from exit worker by lua" )
178
+ local process = require " ngx.process"
179
+ ngx. log (ngx. INFO, " hello from exit worker by lua, process type: " , process. type())
178
180
}
179
181
-- - config
180
182
location = /t {
@@ -187,5 +189,7 @@ qr/privileged agent process \d+ exited/,
187
189
start privileged agent process
188
190
-- - shutdown_error_log eval
189
191
[
190
- qr/ hello from exit worker by lua$/ ,
192
+ qr/ cache loader process \d+ exited/ ,
193
+ qr/ cache manager process \d+ exited/ ,
194
+ qr/ hello from exit worker by lua, process type: worker/ ,
191
195
]
0 commit comments