Skip to content

Commit

Permalink
fix: selected nonsanity tests are stabilized (#13543)
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Semmelrock <nils.semmelrock@tngtech.com>
  • Loading branch information
nstng committed Aug 10, 2022
1 parent a77262d commit c181ca4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def test_activate_deactivate_multiplededicated(self):
bearer_ids,
)
for i in range(num_dedicated_bearers):
time.sleep(0.1)
response = self._s1ap_wrapper.s1_util.get_response()
self.assertEqual(
response.msg_type,
Expand All @@ -124,8 +125,8 @@ def test_activate_deactivate_multiplededicated(self):
)

print(
"********************** Deleted dedicated bearer with"
"with bearer id",
"********************** Deleted dedicated bearer with "
"bearer id",
bearer_ids[i],
)
# Verify if flow rules are deleted for dedicated bearers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_no_attach_complete_with_mme_restart(self):
# Receive NW initiated detach request
response = self._s1ap_wrapper.s1_util.get_response()

while response.msg_type == s1ap_types.tfwCmd.UE_ATTACH_ACCEPT_IND:
while response.msg_type == s1ap_types.tfwCmd.UE_ATTACH_ACCEPT_IND.value:
print(
"Received Attach Accept retransmission from before restart",
"Ignoring...",
Expand All @@ -140,22 +140,6 @@ def test_no_attach_complete_with_mme_restart(self):
nw_init_detach_req.Type,
s1ap_types.ueNwInitDetType_t.TFW_RE_ATTACH_REQUIRED.value,
)
# Receive NW initiated detach request
response = self._s1ap_wrapper.s1_util.get_response()
self.assertEqual(
response.msg_type,
s1ap_types.tfwCmd.UE_NW_INIT_DETACH_REQUEST.value,
)
nw_init_detach_req = response.cast(s1ap_types.ueNwInitdetachReq_t)
print(
"**************** Received NW initiated Detach Req with detach "
"type set to ",
nw_init_detach_req.Type,
)
self.assertEqual(
nw_init_detach_req.Type,
s1ap_types.ueNwInitDetType_t.TFW_RE_ATTACH_REQUIRED.value,
)

print("**************** Sending Detach Accept")
# Send detach accept
Expand All @@ -168,6 +152,28 @@ def test_no_attach_complete_with_mme_restart(self):

# Wait for UE context release command
response = self._s1ap_wrapper.s1_util.get_response()

# Ignore retransmitted NW Initiated Detach Request messages.
# This test waits for a couple of seconds after the MME restart, but most
# of the time MME comes up early after the restart and retransmits multiple
# NW Initiated Detach Request messages on T3422 Timer expiry.
while (
response.msg_type
== s1ap_types.tfwCmd.UE_NW_INIT_DETACH_REQUEST.value
):
nw_init_detach_req = response.cast(s1ap_types.ueNwInitdetachReq_t)
print(
"**************** Received retransmitted NW Initiated Detach "
"Req with detach type set to",
nw_init_detach_req.Type,
"Ignoring...",
)
self.assertEqual(
nw_init_detach_req.Type,
s1ap_types.ueNwInitDetType_t.TFW_RE_ATTACH_REQUIRED.value,
)
response = self._s1ap_wrapper.s1_util.get_response()

self.assertEqual(
response.msg_type,
s1ap_types.tfwCmd.UE_CTX_REL_IND.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_sctp_shutdown_while_stateless_mme_is_stopped(self):
print("Redis state after SCTP shutdown")
self._s1ap_wrapper.magmad_util.print_redis_state()

print("Starting MME service and waiting for 20 seconds")
print("Starting MME service and waiting for 30 seconds")
self._s1ap_wrapper.magmad_util.exec_command(
"sudo service magma@mobilityd start",
)
Expand Down

0 comments on commit c181ca4

Please sign in to comment.