Skip to content

Commit 7d36ad2

Browse files
committed
update after name change
1 parent f8ba801 commit 7d36ad2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_restart.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ async def test_app_worker_restart(server_app, threading_mode):
4747
@pytest.mark.asyncio
4848
@pytest.mark.skipif(platform.system() == 'Windows', reason='SIGHUP/SIGSTOP not available on Windows')
4949
@pytest.mark.parametrize('threading_mode', ['runtime', 'workers'])
50-
async def test_app_worker_graceful_restart(server_app, threading_mode):
51-
workers_graceful_timeout = 2
50+
async def test_app_workers_kill_timeout(server_app, threading_mode):
51+
workers_kill_timeout = 2
5252
with tempfile.TemporaryDirectory() as tmp_dir:
5353
pid_file_path = Path(tmp_dir, 'server.pid')
5454
async with server_app(
5555
interface='wsgi',
5656
app='restart',
5757
threading_mode=threading_mode,
58-
extra_args={'workers_graceful_timeout': workers_graceful_timeout, 'pid_file': pid_file_path},
58+
extra_args={'workers_kill_timeout': workers_kill_timeout, 'pid_file': pid_file_path},
5959
) as port:
6060
with pid_file_path.open('r') as pid_fd:
6161
server_pid = int(pid_fd.read().strip())
@@ -73,7 +73,7 @@ async def test_app_worker_graceful_restart(server_app, threading_mode):
7373
assert worker_pid_after_one_restart is not None
7474

7575
# wait until the worker_pid is gone
76-
time.sleep(workers_graceful_timeout + 0.01)
76+
time.sleep(workers_kill_timeout + 0.01)
7777

7878
# suspend the new worker process to simulate that it hangs
7979
os.kill(worker_pid_after_one_restart, signal.SIGSTOP)

0 commit comments

Comments
 (0)