Skip to content

Add missing test coverage#8

Merged
merlimat merged 2 commits intooxia-db:mainfrom
merlimat:add-missing-tests
Apr 16, 2026
Merged

Add missing test coverage#8
merlimat merged 2 commits intooxia-db:mainfrom
merlimat:add-missing-tests

Conversation

@merlimat
Copy link
Copy Markdown
Contributor

Summary

  • compare_test.py: edge-byte cases (null bytes, slash-only keys, empty segments, long common prefixes), explicit hierarchical-vs-natural sort divergence with assertion that natural ordering gives the opposite sign, and sorted-list transitivity test
  • sessions_test.py: _get_version unit tests for ephemeral/non-ephemeral records, including a session_id=0 regression guard against a truthy-check refactor
  • client_test.py: 8 new integration tests + 2 strengthened existing tests:
    • SessionNotFound via forcibly-closed server-side session
    • Delete ephemeral after session close (cross-client observation)
    • Secondary-index EQUAL echo-back (the one comparison type the existing test missed)
    • Session timeout boundary cases (heartbeat survival + below-floor rejection)
    • Empty-range list() on multi-shard setup
    • Cross-shard hierarchical sort consistency for list()
    • Multi-shard assertion in test_floor_ceiling_get
    • Enabled previously commented-out test_sequence_updates block

Test plan

  • uv run pytest tests/compare_test.py -v — 4 passed
  • uv run pytest tests/sessions_test.py -v — 17 passed
  • uv run pytest tests/client_test.py -v — 23 passed
  • uv run pytest tests/ -v — 43 passed, 0 failed

- compare_test: edge-byte cases, explicit hierarchical-vs-natural
  sort divergence, and sorted-list transitivity
- sessions_test: _get_version unit tests for ephemeral/non-ephemeral
  records, including session_id=0 regression guard
- client_test: SessionNotFound via stale session, delete ephemeral
  after session close, secondary-index EQUAL echo-back, session
  timeout boundary cases, empty-range list on multi-shard, cross-shard
  hierarchical sort consistency for list(), multi-shard assertion in
  floor/ceiling test, and enabled previously commented-out
  sequence_updates block

Signed-off-by: Matteo Merli <mmerli@apache.org>
@merlimat merlimat force-pushed the add-missing-tests branch 2 times, most recently from 569e2db to f1ca6ad Compare April 16, 2026 01:21
@merlimat merlimat merged commit 5aed96c into oxia-db:main Apr 16, 2026
2 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