Flaky eunit: bookclub_initiated_v1_to_sqlite_clubs_tests times out on bookclub_read_model_store during replay #11

Open
opened 2026-12-01 12:03:31 +00:00 by mercurius · 0 comments
Member

Purpose (reliability): rebar3 eunit on the forge gives the same verdict on every run of one commit. A projection test that times out on the shared sqlite store means a green tip can come back red and need a rerun.

What happened. bookclub_initiated_v1_to_sqlite_clubs_tests:an_archived_club_moves_the_row_to_archived/0 failed once on a commit that touches no projection code. Every other test passed (Failed: 1, Passed: 128).

**exit:{timeout,{gen_server,call,[bookclub_read_model_store,{q,"SELECT club_id, name, status, initiated_by, initiated_at, event_id, version FROM clubs WHERE club_id = ?",[<<"bookclub-01a2317197e47f9aa50a0e6...">>]},5000]}}

It was raised in project_bookclub_test_env:await_rows/3 (test_env.erl:64). Just before that, bookclub_archived_v1_to_sqlite_clubs:handle_event/4 (src/bookclub_archived/bookclub_archived_v1_to_sqlite_clubs.erl:25) timed out on its own gen_server:call(bookclub_read_model_store, {exec, "INSERT OR REPLACE INTO clubs ...", ...}) after 5000 ms, while replaying (replaying => true, global_position => 4). The evoq handler then terminated, and the store's subscription shut down. Around every projection test the log also shows [evoq] Failed to ack progress ... {subscription_not_found, ...} warnings and =ERROR REPORT lines on shared-store teardown, so the projection suites share evoq and sqlite state.

Attempts

  1. 2026-12-01, lint.yml run 6275, job 25919, tip 81754b14 (PR #10, mcl-bookclub#9): red as above. The dispatcher ruled one rerun of job 25919: green. The same commit passed eunit twice on msi00 in the same CI image (macula-ci-otp:20261124-0509) that day.

Not investigated further: the cause is open. A store process blocked during replay, and teardown order between projection suites, are the two leads the log gives.

Refs macula-services/mcl-bookclub#9

Purpose (reliability): `rebar3 eunit` on the forge gives the same verdict on every run of one commit. A projection test that times out on the shared sqlite store means a green tip can come back red and need a rerun. **What happened.** `bookclub_initiated_v1_to_sqlite_clubs_tests:an_archived_club_moves_the_row_to_archived/0` failed once on a commit that touches no projection code. Every other test passed (Failed: 1, Passed: 128). ``` **exit:{timeout,{gen_server,call,[bookclub_read_model_store,{q,"SELECT club_id, name, status, initiated_by, initiated_at, event_id, version FROM clubs WHERE club_id = ?",[<<"bookclub-01a2317197e47f9aa50a0e6...">>]},5000]}} ``` It was raised in `project_bookclub_test_env:await_rows/3` (test_env.erl:64). Just before that, `bookclub_archived_v1_to_sqlite_clubs:handle_event/4` (src/bookclub_archived/bookclub_archived_v1_to_sqlite_clubs.erl:25) timed out on its own `gen_server:call(bookclub_read_model_store, {exec, "INSERT OR REPLACE INTO clubs ...", ...})` after 5000 ms, while replaying (`replaying => true`, `global_position => 4`). The evoq handler then terminated, and the store's subscription shut down. Around every projection test the log also shows `[evoq] Failed to ack progress ... {subscription_not_found, ...}` warnings and `=ERROR REPORT` lines on shared-store teardown, so the projection suites share evoq and sqlite state. **Attempts** 1. 2026-12-01, lint.yml run 6275, job 25919, tip 81754b14 (PR #10, mcl-bookclub#9): red as above. The dispatcher ruled one rerun of job 25919: green. The same commit passed eunit twice on msi00 in the same CI image (macula-ci-otp:20261124-0509) that day. Not investigated further: the cause is open. A store process blocked during replay, and teardown order between projection suites, are the two leads the log gives. Refs macula-services/mcl-bookclub#9
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
macula-services/mcl-bookclub#11
No description provided.