openresty / openresty/lua-nginx-module

tests: pattern "[error]" should not match any line in error.log of TEST 6 t/162-exit-worker.t.

Open
#1,867 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.8k
Forks
2.1k
Avg merge
6h 1m
Merged PRs (30d)
6

Description

I found a occasinal failures of the test case with TEST_NGINX_USE_HUP enabled, when I specified no_shuffle() and run TEST 6 following TEST 2, I found that this failure is certainly appear.

The reason for this is that when switching between test block (from TEST 2 to TEST 6) using SIGHUP, there are error logs from previous test block that affects the next test block when the old process is not fully exited.

Perhaps we should modify Test::Nginx module to avoid this case.

error log:

#   Failed test 'TEST 6: skip in cache processes (with exit worker and privileged agent) - pattern "[error]" should not match any line in error.log but matches line "2021/03/19 18:55:35 [error] 3947744#0: exit_worker_by_lua_file error: cannot open /home/jiahao/work/org/lua-nginx-module/t/servroot/html/exit_worker.lua: No such file or directory" (req 0)

  • nginx version: 1.19.3.1
  • lua-nginx-module version: 0.10.19.
  • test-nginx 0.29.

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 t/162-exit-worker.t, especially TEST 2 and TEST 6, and inspect how Test::Nginx switches test blocks with TEST_NGINX_USE_HUP. Reproduce the failure with no_shuffle() and verify that TEST 6 no longer matches error.log lines left by the previous test block.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.