Make test_list_wait_active_timeout tolerate a loaded machine #205

Open
koolkhel wants to merge 1 commits from koolkhel/vitastor:list-wait-test-load into master
Contributor

Description

Follow-up to #201. test_list_wait_active_timeout checked which PGs had timed out at fixed points in real time: PG 1 at 1.2 s, with PG 3's deadline at 1.5 s, and only PG 2 listed right after its reply at 0.5 s. A stall of the test process of 300 ms or more at those points (a busy CI runner) failed it although the code was right.

The test now keeps the 0.5 s delay of PG 2's reply, which is what gives PG 3 a later deadline than PG 1, and then drives the listing timer by the real time that passed, every 0.1 s, until all PGs are done (at most 5 s). It checks only that both inactive PGs time out. A stall can make PG 3 expire in the same pass as PG 1, so the test then passes without the fix too, but it can no longer fail with it.

Found: by review — a similar wall-clock assert in another test failed on a loaded CI runner; this one has the same kind of 300 ms margin.

Tested: test_cluster_client — passes; still fails without the #201 change; passes with a 1.1 s stall inserted before PG 2's reply and, separately, before the first timer tick (the old version fails with the latter).

Contributor Name

Yury Luneff (MIND Software LLC, https://mindsw.io)

CLA

### Description Follow-up to #201. `test_list_wait_active_timeout` checked which PGs had timed out at fixed points in real time: PG 1 at 1.2 s, with PG 3's deadline at 1.5 s, and only PG 2 listed right after its reply at 0.5 s. A stall of the test process of 300 ms or more at those points (a busy CI runner) failed it although the code was right. The test now keeps the 0.5 s delay of PG 2's reply, which is what gives PG 3 a later deadline than PG 1, and then drives the listing timer by the real time that passed, every 0.1 s, until all PGs are done (at most 5 s). It checks only that both inactive PGs time out. A stall can make PG 3 expire in the same pass as PG 1, so the test then passes without the fix too, but it can no longer fail with it. Found: by review — a similar wall-clock assert in another test failed on a loaded CI runner; this one has the same kind of 300 ms margin. Tested: test_cluster_client — passes; still fails without the #201 change; passes with a 1.1 s stall inserted before PG 2's reply and, separately, before the first timer tick (the old version fails with the latter). ### Contributor Name Yury Luneff (MIND Software LLC, https://mindsw.io) ### CLA - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
koolkhel added 1 commit 2026-11-29 15:15:22 +03:00
The test checked which PGs had timed out at fixed points in real time,
with 300 ms margins, so a stall of the test process on a busy machine
failed it. Drive the listing timer by the real time that passed until
all PGs are done, and check only that both inactive PGs time out.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u list-wait-test-load:koolkhel-list-wait-test-load
git checkout koolkhel-list-wait-test-load
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#205
No description provided.