Orchestrata Ultimate › Tests › Reference › session › test_session_edge_cases

Tests reference — tests/session/test_session_edge_cases.py

Module of tests/session, split out because the directory page would be too large.

Prose pending.

tests/session/test_session_edge_cases.py

source · 12 tests · 310 lines

Edge case tests for orchestrata_ultimate.session.

Covers: infra.redis_state, session.constants, session.fact_emitter, session.recovery, session.redis_store, session.types

Kind Name Line Description
class TestMaxFacts 92
method TestMaxFacts.test_emit_up_to_max_facts 93 Session handles maximum facts (enforced by Redis ltrim).
method TestMaxFacts.test_query_after_max_facts 113 Query works correctly after exceeding max facts.
class TestLongSessionIds 138
method TestLongSessionIds.test_long_session_id_256_chars 139 Session works with a 256-character session ID.
method TestLongSessionIds.test_session_id_with_special_chars 152 Session works with special characters in ID.
class TestLongFactTerms 170
method TestLongFactTerms.test_large_fact_data_10kb 171 Fact with 10KB of data.
method TestLongFactTerms.test_large_fact_data_100kb 185 Fact with 100KB of data.
method TestLongFactTerms.test_fact_with_unicode 199 Fact with unicode data.
method TestLongFactTerms.test_deeply_nested_fact_data 218 Fact with deeply nested JSON structure.
class TestCorruptedState 242
method TestCorruptedState.test_recover_from_corrupted_session 243 Recovery handles corrupted session state.
method TestCorruptedState.test_recover_no_checkpoint_raises 260 Recovery raises when no checkpoint exists.
method TestCorruptedState.test_rollback_to_specific_checkpoint 272 Rollback to a specific checkpoint after state changes.
method TestCorruptedState.test_cleanup_old_checkpoints 294 Cleanup prunes old checkpoints keeping latest N.