openresty / openresty/test-nginx

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

Open
#80 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
455
Forks
112
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the test case directives shown in the issue: wait, must_die, and error_log. Compare when error_log is checked with the contents of t/servroot/error.log, then trace the test runner's handling of must_die and wait. Done means the critical log lines are reliably available without requiring an unusually large wait value.

Written by the indexing model from the issue text.

Assessment

Tech stack
nginx, perl
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.