From c4c00f28492a2a21e4743ee45d465aacd40b279b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Misbach?= Date: Fri, 15 Dec 2023 15:34:03 +0100 Subject: [PATCH] [uss_qualifier/utm/conflict_higher_priority] Fix flight 1 sharing expectation --- .../conflict_higher_priority.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py index 591f7ad78c..32fd8e6ad6 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py @@ -192,13 +192,16 @@ def run(self, context: ExecutionContext): self.begin_test_case("Modify activated flight with pre-existing conflict") ( + flight_1_intent, flight_1_oi_ref, flight_2_oi_ref, ) = self._modify_activated_flight_conflict_preexisting(flight_1_oi_ref) self.end_test_case() self.begin_test_case("Attempt to modify activated flight in conflict") - self._attempt_modify_activated_flight_conflict(flight_1_oi_ref, flight_2_oi_ref) + self._attempt_modify_activated_flight_conflict( + flight_1_intent, flight_1_oi_ref, flight_2_oi_ref + ) self.end_test_case() self.end_test_scenario() @@ -319,7 +322,7 @@ def _attempt_activate_flight_conflict( def _modify_activated_flight_conflict_preexisting( self, flight_1_oi_ref: Optional[OperationalIntentReference] - ) -> Tuple[OperationalIntentReference, OperationalIntentReference]: + ) -> Tuple[FlightIntent, OperationalIntentReference, OperationalIntentReference]: _ = delete_flight_intent( self, "Delete Flight 2", self.control_uss, self.flight2_id ) @@ -395,15 +398,16 @@ def _modify_activated_flight_conflict_preexisting( flight_1_oi_ref = validator.expect_shared( self.flight1m_activated.request ) + return self.flight1m_activated, flight_1_oi_ref, flight_2_oi_ref else: flight_1_oi_ref = validator.expect_shared( self.flight1_activated.request ) - - return flight_1_oi_ref, flight_2_oi_ref + return self.flight1_activated, flight_1_oi_ref, flight_2_oi_ref def _attempt_modify_activated_flight_conflict( self, + flight_1_intent: FlightIntent, flight_1_oi_ref: OperationalIntentReference, flight_2_oi_ref: OperationalIntentReference, ): @@ -440,7 +444,7 @@ def _attempt_modify_activated_flight_conflict( self.flight1_id, ) validator.expect_shared( - self.flight1m_activated.request, + flight_1_intent.request, skip_if_not_found=True, )