Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion PROVESFlightControllerReference/test/yamcs/test_yamcs_noop.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
the full TC + TM + events path is healthy.
"""

import logging
import queue
import time

Expand Down Expand Up @@ -71,4 +72,15 @@ def test_noop_round_trip(yamcs_client, yamcs_processor, yamcs_instance):
f"{TOTAL_TIMEOUT_S}s after {attempts} CMD_NO_OP attempts"
)
finally:
subscription.cancel()
# websocket-client's WebSocketApp.close() has a check-then-use race on
# self.sock: the reader thread can null it between the truthiness check
# and the close_frame read, raising AttributeError out of teardown. A
# teardown error would replace this test's real result (pass, or the
# AssertionError above) with a misleading traceback, so swallow it.
try:
subscription.cancel()
except Exception: # noqa: BLE001 - teardown must not mask the test result
logging.getLogger(__name__).warning(
"Ignoring error while cancelling YAMCS event subscription",
exc_info=True,
)
Loading