openresty / test-nginx

Data-driven test scaffold for Nginx C module and OpenResty Lua library development
http://search.cpan.org/dist/Test-Nginx
438 stars 105 forks source link

"wait" seem to be ignored when "must_die" is used #80

Open jdesgats opened 6 years ago

jdesgats commented 6 years ago

I have a test that involves making nginx kill itself in the init_worker phase (a worker kills the master process and then kill itself, just in case), so my test look like that

--- wait: 1
--- error_log
[crit]
--- must_die: 0

but the error_log started to randomly fail at some point, I tracked this down to the fact that the error_log doesn't get the critical log lines, but they do appear in the t/servroot/error.log file, so I guess they are not written yet at that point. Setting a ridiculously high wait doesn't help as it seem to be ignored in that case.