Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: selected nonsanity tests are stabilized #13543

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)
nstng marked this conversation as resolved.
Show resolved Hide resolved
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