Skip to content

test(indexeddb): isolate temporary directories across test processes - #1589

Merged
ldm0 merged 1 commit into
mainfrom
codex/webfetch-test-isolation
Oct 15, 2026
Merged

ldm0 merged 1 commit into
mainfrom
codex/webfetch-test-isolation

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Concurrent test processes restart their local sequence counter. Combining that counter with a timestamp did not guarantee separate temporary directories, and create_dir_all could silently reuse an existing directory.

Change

Include the process ID in the existing test-directory name and create the directory exclusively. Keep the current RAII cleanup and database test behavior.

Test fixtures only; production database paths and persistence semantics are unchanged.

Reproduce and verify

Run the existing IndexedDB suite with parallel nextest processes. Each fixture owns a separate directory, so deleting one test's data cannot remove another test's database.

cargo nextest run --locked -p moli-indexeddb --lib --test-threads 8 --no-fail-fast

Before extraction, this source passed cargo fmt --all, workspace/all-target/all-feature Clippy with -D warnings, and the full workspace nextest suite (20,140 passed, 17 skipped). This unit has no source changes since that validation. The PR CI checks its extraction onto main be610b8fe.

Regression fixtures:

Dependencies

Independent change targeting main; no other open PR is required. Extracted from #1501. Review map and sibling PRs.

Review units and their dependencies

@lanyue-llk
lanyue-llk force-pushed the codex/webfetch-test-isolation branch from dd1697f to 725acf4 Compare October 15, 2026 13:35
@ldm0
ldm0 merged commit ed55cf3 into main Oct 15, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants