Skip to content

Commit 8b3e3a9

Browse files
16bit-ykikoclaude
andauthored
refactor(tests): reorganize integration tests into domain-based subdirectories (#409)
## Summary - Extract shared test utilities into `tests/integration/utils/` (client, workspace, assertions, wait, cache) - Migrate 12 test files into categorized subdirectories: `lifecycle/`, `compilation/`, `features/`, `modules/`, `extensions/`, `stress/` - Merge `test_include_completion.py` + `test_import_completion.py` → `features/test_completion.py` - Remove stale directory-tree comments and section divider comments ## Test plan - [x] `pytest --collect-only` collects all 113 tests - [x] All test module imports verified - [x] `pixi run format` applied 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Reorganized integration suites: added new feature tests (completion, server) and removed older duplicated modules. * Centralized shared test utilities and assertion helpers for diagnostics, workspace operations, waiting/synchronization, and cache inspection. * **Chores / Refactor** * Standardized test client lifecycle and helper usage across suites for more reliable test flows. * Improved server session lifecycle handling for more predictable document/session resets during tests. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2bbdf6c commit 8b3e3a9

28 files changed

+1318
-1499
lines changed

src/server/master_server.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,12 @@ void MasterServer::register_handlers() {
308308
auto path = uri_to_path(params.text_document.uri);
309309
auto path_id = workspace.path_pool.intern(path);
310310

311-
auto [it, _] = sessions.try_emplace(path_id);
311+
auto [it, inserted] = sessions.try_emplace(path_id);
312312
auto& session = it->second;
313+
if(!inserted) {
314+
// DenseMap tombstone may retain stale data — reset to a fresh Session.
315+
session = Session{};
316+
}
313317
session.path_id = path_id;
314318
session.version = params.text_document.version;
315319
session.text = params.text_document.text;

0 commit comments

Comments
 (0)