diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index d32f20260..4c450287c 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -744,6 +744,7 @@ private function f_shutdown_helper() runs on test_CT { private function f_legacy_bssap_reset(integer bssap_idx := 0) runs on test_CT { var BSSAP_N_UNITDATA_ind ud_ind; + var boolean reset_received := false; timer T := 5.0; BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap[bssap_idx].sccp_addr_peer, g_bssap[bssap_idx].sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled))); @@ -757,10 +758,20 @@ private function f_legacy_bssap_reset(integer bssap_idx := 0) runs on test_CT { log("Respoding to inbound RESET with RESET-ACK"); BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, ts_BSSMAP_ResetAck(g_osmux_enabled))); + reset_received := true; repeat; } [] BSSAP.receive { repeat; } - [] T.timeout { setverdict(fail, "Waiting for RESET-ACK after sending RESET"); } + [] T.timeout { + log("Timeout waiting for RESET-ACK after sending RESET"); + /* If we received a RESET after ours was sent, it + may be a race condition where the other peer beacame + available after we sent it, but we are in a desired + state anyway, so go forward. */ + if (not reset_received) { + setverdict(fail); + } + } } }