Skip to content

test(persist): Stabilize flaky session write fixture on nightly CI#39

Merged
mhiro2 merged 1 commit into
mainfrom
test/stabilize-persist-async-write
Jun 3, 2026
Merged

test(persist): Stabilize flaky session write fixture on nightly CI#39
mhiro2 merged 1 commit into
mainfrom
test/stabilize-persist-async-write

Conversation

@mhiro2
Copy link
Copy Markdown
Owner

@mhiro2 mhiro2 commented Jun 3, 2026

Summary

  • Stabilize the persist_sessions_spec write fixture that intermittently failed with Store write failed on the nightly CI job.
  • Switch the write_and_wait helper from the async store.write (libuv fs_open/fs_write/fs_rename callback chain) to the synchronous store.write_sync, making setup/teardown writes deterministic and eliminating the transient async-fs race.
  • Coverage of the async write path is preserved: it is still exercised by the save_current (async) + wait_for_store tests and the "async save write fails" test.
  • Verified locally by running the spec 10 times in a row (28 success / 0 failed / 0 errors); fmt/lint/test all pass.

Changes

  • e2c6a0f : test(persist): stabilize flaky session write fixture on nightly CI
    • Replace write_and_wait with a blocking store.write_sync call, removing the vim.wait-based async completion polling that introduced fixture-write nondeterminism.
    • Document the rationale in a comment (async path still covered by other tests; root cause of the nightly flakiness).

The write_and_wait helper drove the async store.write path (libuv
fs_open/fs_write/fs_rename callback chain), which intermittently failed
on the nightly CI job with "Store write failed" during before_each and
after_each cleanup writes. Switch the fixture to the synchronous
store.write_sync so setup/teardown writes are deterministic and no
longer subject to the transient async-fs race. The async write path
stays covered by the save_current and "async save write fails" tests.
@mhiro2 mhiro2 self-assigned this Jun 3, 2026
@mhiro2 mhiro2 added the bug Something isn't working label Jun 3, 2026
@mhiro2 mhiro2 merged commit 4347894 into main Jun 3, 2026
3 checks passed
@mhiro2 mhiro2 deleted the test/stabilize-persist-async-write branch June 3, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant