Orchestrata Ultimate › Tests › Reference › kernel › test_router_extended
Tests reference — tests/kernel/test_router_extended.py
Module of tests/kernel, split out because the directory page would be too large.
Prose pending.
tests/kernel/test_router_extended.py
source · 36 tests · 601 lines
Extended tests for kernel/router.py — error paths and edge cases.
Covers: agents.volk_registry, kernel.router, core.packet/ (package)
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestRoutingMetricsEdgeCases |
144 | |
| method | TestRoutingMetricsEdgeCases.test_update_latency_when_no_deliveries_yet |
145 | Cover the else branch in update_latency when total == 0. |
| method | TestRoutingMetricsEdgeCases.test_success_rate_all_failed |
153 | |
| method | TestRoutingMetricsEdgeCases.test_to_dict_all_defaults |
158 | |
| class | TestRoutingResultEdgeCases |
173 | |
| method | TestRoutingResultEdgeCases.test_defaults |
174 | |
| method | TestRoutingResultEdgeCases.test_to_dict_no_errors_no_warnings |
184 | |
| class | TestMessageStatusEdgeCases |
201 | |
| method | TestMessageStatusEdgeCases.test_multiple_transitions |
202 | |
| method | TestMessageStatusEdgeCases.test_to_dict_with_transitions |
212 | |
| class | TestCXPRouterResolveRecipientsExtended |
230 | |
| method | TestCXPRouterResolveRecipientsExtended.test_resolve_multicast_partial_failure |
232 | Cover line 464: some recipients resolve, some fail. |
| method | TestCXPRouterResolveRecipientsExtended.test_resolve_role_multiple_volks |
242 | Role matching multiple volks should return all aliases. |
| method | TestCXPRouterResolveRecipientsExtended.test_resolve_multicast_deduplicates |
253 | Multicast with duplicate aliases should deduplicate. |
| method | TestCXPRouterResolveRecipientsExtended.test_resolve_broadcast_empty_registry |
263 | Broadcast with no volks returns empty list. |
| method | TestCXPRouterResolveRecipientsExtended.test_resolve_broadcast_case_insensitive |
272 | Broadcast keyword is case-insensitive. |
| method | TestCXPRouterResolveRecipientsExtended.test_resolve_multicast_all_fail |
283 | Multicast where every recipient fails should raise ValueError. |
| class | TestCXPRouterRouteExtended |
297 | |
| method | TestCXPRouterRouteExtended.test_route_role_based_multicast |
299 | Route to a role that resolves to multiple volks. |
| method | TestCXPRouterRouteExtended.test_route_broadcast_all_offline |
316 | Broadcast when all volks are offline. |
| method | TestCXPRouterRouteExtended.test_route_broadcast_partial_offline |
331 | Broadcast with mix of online and offline volks. |
| method | TestCXPRouterRouteExtended.test_route_broadcast_sender_only_active_volk |
346 | Broadcast when sender is the only active volk routes to itself. |
| method | TestCXPRouterRouteExtended.test_route_offline_recipient_unicast |
360 | Unicast to an offline volk should queue and warn. |
| method | TestCXPRouterRouteExtended.test_route_schema_invalid_ttl |
375 | Schema validation failure due to TTL <= 0. |
| method | TestCXPRouterRouteExtended.test_route_schema_missing_sender |
388 | Schema validation failure due to empty sender. |
| method | TestCXPRouterRouteExtended.test_route_schema_missing_recipient |
401 | Schema validation failure due to empty recipient. |
| class | TestCXPRouterValidateSenderExtended |
419 | |
| method | TestCXPRouterValidateSenderExtended.test_validate_sender_missing_volk_info |
421 | Cover line 417: is_registered True but get_volk returns None. |
| class | TestCXPRouterResolveAndValidateExtended |
431 | |
| method | TestCXPRouterResolveAndValidateExtended.test_resolve_and_validate_invalid_after_resolution |
433 | Cover line 265: recipient resolves but is_registered is False. |
| method | TestCXPRouterResolveAndValidateExtended.test_resolve_and_validate_generic_exception |
449 | Cover the generic except Exception branch in _resolve_and_validate. |
| class | TestCXPRouterGetAllVolksExtended |
469 | |
| method | TestCXPRouterGetAllVolksExtended.test_get_all_only_terminated |
470 | When every registered volk is terminated, return empty list. |
| method | TestCXPRouterGetAllVolksExtended.test_get_all_mixed_status |
479 | Only non-terminated volks are returned. |
| class | TestCXPRouterDetermineRoutingModeExtended |
493 | |
| method | TestCXPRouterDetermineRoutingModeExtended.test_multicast_from_count_no_comma |
494 | Recipient count > 1 triggers MULTICAST even without comma. |
| class | TestCXPRouterTraceExtended |
503 | |
| method | TestCXPRouterTraceExtended.test_get_message_trace_multiple_entries |
504 | |
| method | TestCXPRouterTraceExtended.test_trace_no_eviction_at_exact_limit |
515 | |
| method | TestCXPRouterTraceExtended.test_trace_eviction_removes_oldest |
524 | |
| class | TestCXPRouterIsVolkOnlineExtended |
535 | |
| method | TestCXPRouterIsVolkOnlineExtended.test_suspended_not_online |
536 | |
| method | TestCXPRouterIsVolkOnlineExtended.test_registered_not_online |
543 | |
| method | TestCXPRouterIsVolkOnlineExtended.test_terminated_not_online |
550 | |
| class | TestCXPRouterMessageStatusExtended |
558 | |
| method | TestCXPRouterMessageStatusExtended.test_get_message_status_returns_correct_object |
559 | |
| method | TestCXPRouterMessageStatusExtended.test_track_message_status_preserves_history |
570 | |
| class | TestCXPRouterMetricsExtended |
589 | |
| method | TestCXPRouterMetricsExtended.test_metrics_updated_after_route |
591 |