From a1cbec52f080d85368db5f75eb1294687d2dcc41 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Tue, 21 Feb 2023 12:44:12 +0100 Subject: [PATCH] bsc: TC_ho_in_fail_mgw_mdcx_timeout: fixup Fix that the test was torn down too early, before DLCX messages were received from OsmoBSC. This caused a race condition that sometimes failed the test with: VirtMGW-MGCP-0(1996)@e5a096d6b4ff: Dynamic test case error: Sending data on the connection of port MGCP_CLIENT to 1999:MGCP failed. (Broken pipe) Related: OS#5787 Fixes: 7a8594a8 ("bsc: TC_ho_in_fail_mgw_mdcx_timeout: new test") Change-Id: If47fa3e0204ce841c79a67dd78a1c53d04e4a586 --- bsc/BSC_Tests.ttcn | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 9a2718a27..b9182e3c4 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -6347,6 +6347,15 @@ private function f_ho_into_this_bsc(charstring id, template (omit) BSSMAP_oldToN if (g_pars.expect_ho_fail_lchan_est) { BSSAP.receive(tr_BSSMAP_HandoverFailure); setverdict(pass); + + /* When we let MGCP MDCX run into a timeout, it's still in the + * queue and additionally after BSSAP HandoverFailure, two DLCX + * get sent. */ + if (g_pars.ignore_mgw_mdcx) { + MGCP.receive(tr_MDCX); + MGCP.receive(tr_DLCX); + MGCP.receive(tr_DLCX); + } return; }