Orchestrata Ultimate › Tests › Reference › postman › test_subscription

Tests reference — tests/postman/test_subscription.py

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

Prose pending.

tests/postman/test_subscription.py

source · 56 tests · 887 lines

Comprehensive tests for SubscriptionManager.

Covers: postman.exceptions, postman.subscription_manager, postman.types

Kind Name Line Description
function test_subscribe_simple_topic 58 Test subscribing to a simple topic without wildcards.
function test_subscribe_wildcard_topic 69 Test subscribing to topic with wildcards.
function test_subscribe_with_ttl 77 Test subscribing with TTL expiration.
function test_subscribe_multiple_agents_same_topic 92 Test multiple agents subscribing to the same topic.
function test_subscribe_same_agent_multiple_topics 104 Test single agent subscribing to multiple topics.
function test_subscribe_duplicate_pattern 119 Test subscribing to the same pattern twice creates two subscriptions.
function test_subscribe_invalid_pattern_syntax 135 Test subscribing with invalid pattern syntax.
function test_subscribe_complex_wildcard_patterns 151 Test subscribing with complex wildcard patterns.
function test_unsubscribe_existing_subscription 172 Test unsubscribing from an existing subscription.
function test_unsubscribe_one_of_multiple 184 Test unsubscribing from one topic when agent has multiple subscriptions.
function test_unsubscribe_nonexistent_agent 202 Test unsubscribing with an agent that doesn't exist.
function test_unsubscribe_nonexistent_topic 211 Test unsubscribing from a topic the agent isn't subscribed to.
function test_unsubscribe_exact_pattern_match 222 Test unsubscribe requires exact pattern match.
function test_unsubscribe_duplicate_subscriptions 231 Test unsubscribing when agent has duplicate subscriptions to same pattern.
function test_unsubscribe_all_with_subscriptions 256 Test unsubscribing all subscriptions for an agent.
function test_unsubscribe_all_nonexistent_agent 270 Test unsubscribe_all for an agent with no subscriptions.
function test_unsubscribe_all_does_not_affect_other_agents 276 Test unsubscribe_all only affects the specified agent.
function test_get_subscribers_exact_match 297 Test getting subscribers for an exact topic match.
function test_get_subscribers_no_wildcard_expansion 310 Test get_subscribers does not expand wildcards.
function test_get_subscribers_no_matches 322 Test getting subscribers when no exact matches exist.
function test_get_subscribers_excludes_expired 330 Test get_subscribers excludes expired subscriptions.
function test_get_subscribers_deduplicates_agents 345 Test get_subscribers returns each agent only once.
function test_get_subscriptions_existing_agent 361 Test getting subscriptions for an agent with subscriptions.
function test_get_subscriptions_nonexistent_agent 374 Test getting subscriptions for an agent with no subscriptions.
function test_get_subscriptions_includes_expired 381 Test get_subscriptions includes expired subscriptions.
function test_get_subscriptions_returns_copy 394 Test get_subscriptions returns a copy, not the internal list.
function test_match_subscribers_exact_match 415 Test match_subscribers with exact topic match.
function test_match_subscribers_wildcard_pattern 425 Test match_subscribers with wildcard subscriptions.
function test_match_subscribers_complex_wildcards 439 Test match_subscribers with complex wildcard patterns.
function test_match_subscribers_no_matches 454 Test match_subscribers when no patterns match.
function test_match_subscribers_excludes_expired 463 Test match_subscribers excludes expired subscriptions.
function test_match_subscribers_deduplicates_agents 477 Test match_subscribers returns each agent only once.
function test_match_subscribers_question_mark_wildcard 489 Test match_subscribers with ? wildcard (single character).
function test_match_subscribers_character_set_wildcard 504 Test match_subscribers with character set wildcard.
function test_subscription_expiration 524 Test subscription expiration with TTL.
function test_subscription_not_expired 534 Test subscription with long TTL is not expired.
function test_subscription_no_ttl_never_expires 540 Test subscription without TTL never expires.
function test_expired_subscriptions_not_returned_by_get_subscribers 547 Test expired subscriptions are filtered from get_subscribers.
function test_expired_subscriptions_not_returned_by_match_subscribers 559 Test expired subscriptions are filtered from match_subscribers.
function test_subscriptions_persist_across_operations 576 Test subscriptions persist through various operations.
function test_subscription_properties_preserved 594 Test subscription properties are preserved.
function test_cleanup_removes_agent_when_empty 616 Test agent entry is cleaned up when all subscriptions removed.
function test_unsubscribe_all_cleans_up_agent 631 Test unsubscribe_all removes agent entry.
function test_empty_topic_pattern 647 Test subscribing to empty topic pattern.
function test_special_characters_in_pattern 657 Test special characters in topic patterns.
function test_very_long_topic_pattern 676 Test subscription with very long topic pattern.
function test_many_subscriptions_same_agent 687 Test agent with many subscriptions.
function test_many_agents_same_topic 699 Test many agents subscribing to same topic.
function test_concurrent_subscriptions 711 Test concurrent subscription operations.
function test_concurrent_unsubscriptions 725 Test concurrent unsubscription operations.
function test_full_subscription_lifecycle 750 Test complete subscription lifecycle.
function test_multiple_agents_multiple_topics 776 Test complex scenario with multiple agents and topics.
function test_subscription_isolation 813 Test subscriptions are properly isolated between agents.
function test_mixed_ttl_subscriptions 834 Test subscriptions with different TTL values.
function test_error_context_in_exceptions 864 Test exceptions include proper context.
function test_unsubscribe_error_context 877 Test unsubscribe error includes correct context.