MSC_Tests: Expect SGsAP-SERVICE-ABORT-REQUEST on paging timeout

When a paging for a CS-Call times out the MSC/VLR is expected to send an
SGsAP-SERVICE-ABORT-REQUEST to the MME to indicate that the paging has
timed out. This is not taken into accound yet by TTCN3 test
TC_sgsap_paging_and_nothing

Related: OS#3614
Depends: osmo-msc I3f8f153afe24cf2efa245713509bdc8488902877
Change-Id: I99950a17ccf26aaa0eebded5480f33be4c57586a
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 7c4ac51..063105c 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -4491,6 +4491,7 @@
 
 	var octetstring vlr_name := f_enc_dns_hostname(mp_vlr_name);
 	var template PDU_SGsAP exp_resp := tr_SGsAP_PAGING_REQ(g_pars.imsi, vlr_name, CS_call_indicator, omit);
+	var template PDU_SGsAP exp_serv_abrt := ts_SGsAP_SERVICE_ABORT_REQ(g_pars.imsi);
 	var template  LocationAreaId exp_lai := ts_SGsAP_IE_Lai(valueof(ts_SGsAP_LAI('901'H, '70'H, 2342)));
 	exp_resp.sGsAP_PAGING_REQUEST.locationAreaId := exp_lai;
 
@@ -4505,9 +4506,26 @@
 		}
 	}
 
-	/* Now do nothing, the MSC/VLR should fail silently to page after a
-	 * few seconds, The SGs association must remain unchanged. */
-	f_sleep(15.0);
+	/* While we are doing nothing, expect an SGsAP-SERVICE-ABORT-REQUEST
+	 * after some time */
+	timer T := 10.0;
+	T.start
+	alt {
+		[] SGsAP.receive(exp_serv_abrt)
+		{
+			setverdict(pass);
+		}
+		[] SGsAP.receive {
+			setverdict(fail, "unexpected SGsAP message received");
+			self.stop;
+		}
+		[] T.timeout {
+			setverdict(fail, "MSC did not send SGsAP-SERVICE-ABORT-REQUEST");
+			self.stop;
+		}
+	}
+
+	/* The SGs association must remain unchanged. */
 	f_ctrl_get_exp(IPA_CTRL, "fsm.SGs-UE.id.imsi:" & hex2str(g_pars.imsi) & ".state", "SGs-ASSOCIATED");
 
 	f_sgsap_bssmap_screening();