Skip to content

Commit

Permalink
[uss_qualifier/utm/conflict_higher_priority] Fix flight 1 sharing exp…
Browse files Browse the repository at this point in the history
…ectation
  • Loading branch information
mickmis committed Dec 15, 2023
1 parent b87aa56 commit c4c00f2
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
)
Expand Down Expand Up @@ -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,
):
Expand Down Expand Up @@ -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,
)

Expand Down

0 comments on commit c4c00f2

Please sign in to comment.