Skip to content

Commit

Permalink
[uss_qualifier/scenarios/utm/data_exchange_validation] Fix expect_moc…
Browse files Browse the repository at this point in the history
…k_uss_receives_op_intent_notification
  • Loading branch information
mickmis committed Nov 12, 2024
1 parent a1302ef commit 29fd022
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def _plan_successfully_test_case(self, times: Dict[TimeDuringTest, Time]):
self,
self.mock_uss,
flight_1_planning_time,
flight_1_oi_ref.id,
self.tested_uss_client.participant_id,
plan_res.queries[0].request.timestamp,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ def expect_mock_uss_receives_op_intent_notification(
scenario: TestScenarioType,
mock_uss: MockUSSClient,
st: StringBasedDateTime,
op_intent_id: EntityID,
participant_id: str,
plan_request_time: datetime,
):
"""This step checks if a notification is sent to mock_uss within the required time window.
Args:
st: the earliest time a notification may have been sent
op_intent_id: the operational intent ID subject of the notification
participant_id: id of the participant responsible to send the notification
plan_request_time: timestamp of the flight plan query that would lead to sending notification
"""
Expand All @@ -48,13 +50,15 @@ def expect_mock_uss_receives_op_intent_notification(
st,
operation_filter(OperationID.NotifyOperationalIntentDetailsChanged),
direction_filter(QueryDirection.Incoming),
notif_op_intent_id_filter(op_intent_id),
status_code_filter(204),
)

with scenario.check("Expect Notification sent", [participant_id]) as check:
if not found:
check.record_failed(
summary=f"Notification not sent",
details=f"Notification to USS with pre-existing relevant operational intent not sent even though DSS instructed the planning USS to notify due to subscription.",
summary=f"Notification not sent for {op_intent_id}",
details=f"Notification from {participant_id} to USS for {op_intent_id} with pre-existing relevant operational intent not sent even though DSS instructed the planning USS to notify due to subscription.",
query_timestamps=[plan_request_time, query.request.timestamp],
)

Expand Down

0 comments on commit 29fd022

Please sign in to comment.