Skip to content

Commit

Permalink
fix: selected nonsanity tests are stabilized
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 8, 2022
1 parent 8f54687 commit fe3aee4
Show file tree
Hide file tree
Showing 3 changed files with 20 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 @@ -117,17 +117,7 @@ def test_no_attach_complete_with_mme_restart(self):
time.sleep(1)

# Receive NW initiated detach request
response = self._s1ap_wrapper.s1_util.get_response()

while response.msg_type == s1ap_types.tfwCmd.UE_ATTACH_ACCEPT_IND:
print(
"Received Attach Accept retransmission from before restart",
"Ignoring...",
)
response = self._s1ap_wrapper.s1_util.get_response()

self.assertEqual(
response.msg_type,
response = self._s1ap_wrapper.s1_util.get_response(
s1ap_types.tfwCmd.UE_NW_INIT_DETACH_REQUEST.value,
)
nw_init_detach_req = response.cast(s1ap_types.ueNwInitdetachReq_t)
Expand All @@ -141,9 +131,7 @@ def test_no_attach_complete_with_mme_restart(self):
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,
response = self._s1ap_wrapper.s1_util.get_response(
s1ap_types.tfwCmd.UE_NW_INIT_DETACH_REQUEST.value,
)
nw_init_detach_req = response.cast(s1ap_types.ueNwInitdetachReq_t)
Expand All @@ -167,9 +155,7 @@ def test_no_attach_complete_with_mme_restart(self):
)

# Wait for UE context release command
response = self._s1ap_wrapper.s1_util.get_response()
self.assertEqual(
response.msg_type,
response = self._s1ap_wrapper.s1_util.get_response(
s1ap_types.tfwCmd.UE_CTX_REL_IND.value,
)
print("****** Received Ue context release command *********")
Expand All @@ -191,6 +177,19 @@ def test_no_attach_complete_with_mme_restart(self):
wait_for_s1_ctxt_release=False,
)

def assertResponseIgnoringAttachAccept(self, expectedMsg):
response = self._s1ap_wrapper.s1_util.get_response()
while response.msg_type == s1ap_types.tfwCmd.UE_ATTACH_ACCEPT_IND:
print(
"Received Attach Accept retransmission from before restart",
"Ignoring...",
)
response = self._s1ap_wrapper.s1_util.get_response()
self.assertEqual(
response.msg_type,
expectedMsg,
)


if __name__ == "__main__":
unittest.main()
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 fe3aee4

Please sign in to comment.