Skip to content

fix(tests): guard disk-based search test with SEARCH_TEST_LOCK#12

Merged
juice094 merged 1 commit intomainfrom
fix/flaky-test-search-lock
May 11, 2026
Merged

fix(tests): guard disk-based search test with SEARCH_TEST_LOCK#12
juice094 merged 1 commit intomainfrom
fix/flaky-test-search-lock

Conversation

@juice094
Copy link
Copy Markdown
Owner

防御性修复 flaky tests:

  • 操作磁盘 Tantivy 索引(非 RAM),添加 SEARCH_TEST_LOCK 串行化
  • 简化测试中的 自引用为直接调用

验证: cargo check 0 errors; clippy 0 warnings; test 503 passed / 0 failed

…hans + simplify self-references

test_sync_index_to_db_removes_orphans operates on disk-based Tantivy index
(unlike with_temp_index which uses RAM index). Without SEARCH_TEST_LOCK it
may race with other search tests on Windows mmap handle lifecycle.

- Add SEARCH_TEST_LOCK guard to test_sync_index_to_db_removes_orphans
- Simplify crate::search::self-references in test to direct calls
- Zero functional code changes

验证: cargo check 0 errors; clippy 0 warnings; cargo test --workspace 503 passed
@juice094 juice094 merged commit 53c02be into main May 11, 2026
6 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.

1 participant