fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37242?usp=email )
Change subject: s1gw: add and use f_ConnHdlr_expect_shutdown() ......................................................................
s1gw: add and use f_ConnHdlr_expect_shutdown()
Change-Id: I7e982f0268a6ee6059e9dfd5fbd6c9019c18359d Related: SYS#6772 --- M s1gw/S1GW_Tests.ttcn 1 file changed, 18 insertions(+), 6 deletions(-)
Approvals: pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 30dcd46..ffc5c9b 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -143,6 +143,12 @@ log("eNB connection closed"); }
+function f_ConnHdlr_expect_shutdown() runs on ConnHdlr { + S1AP_ENB.receive(tr_SctpShutDownEvent(g_s1ap_conn_id)); + S1AP_ENB.receive(tr_SctpAssocChange(SCTP_SHUTDOWN_COMP, g_s1ap_conn_id)); + S1AP_ENB.receive(PortEvent:{connClosed := ?}); +} + function f_ConnHdlr_setup(Global_ENB_ID genb_id) runs on ConnHdlr { var S1AP_PDU pdu; timer T; @@ -230,9 +236,7 @@ /* MME (S1AP_Server_CT) terminates connection */ f_ConnHdlr_close_conn(genb_id); /* expect our eNB connection to be released gracefully */ - S1AP_ENB.receive(tr_SctpShutDownEvent(g_s1ap_conn_id)); - S1AP_ENB.receive(tr_SctpAssocChange(SCTP_SHUTDOWN_COMP, g_s1ap_conn_id)); - S1AP_ENB.receive(PortEvent:{connClosed := ?}); + f_ConnHdlr_expect_shutdown();
f_ConnHdlr_unregister(genb_id); } @@ -253,9 +257,7 @@ /* establish an eNB connection to the S1GW */ f_ConnHdlr_connect(); /* expect our eNB connection to be released gracefully */ - S1AP_ENB.receive(tr_SctpShutDownEvent(g_s1ap_conn_id)); - S1AP_ENB.receive(tr_SctpAssocChange(SCTP_SHUTDOWN_COMP, g_s1ap_conn_id)); - S1AP_ENB.receive(PortEvent:{connClosed := ?}); + f_ConnHdlr_expect_shutdown(); setverdict(pass); } testcase TC_conn_term_mme_unavail() runs on test_CT {