gbproxy: Fix TC_bvc_reset_sig_from_sgsn
The port receive operation only considers the first message in the queue. We need to drain unrelated status/reset messages, such as those from PTP BVCs, otherwise the test never completes and times out. Change-Id: I1f2c76ae9bdc0267bfca60536e321fe88530803c Related: SYS#5115 OS#4518
This commit is contained in:
parent
4c534bbf18
commit
ef7015f321
|
@ -2305,24 +2305,38 @@ testcase TC_bvc_reset_ptp_from_sgsn() runs on test_CT
|
|||
f_cleanup();
|
||||
}
|
||||
|
||||
private altstep as_ignore_mgmt(BSSGP_BVC_MGMT_PT pt) {
|
||||
[] pt.receive {repeat; }
|
||||
}
|
||||
|
||||
private altstep as_count_bvc0_block(integer pcu_idx, Nsei nsei, inout ro_integer roi)
|
||||
runs on test_CT {
|
||||
var BSSGP_CT pcu_ct := g_pcu[pcu_idx].vc_BSSGP;
|
||||
[] PCU_MGMT.receive(BssgpResetIndication:{0}) from pcu_ct {
|
||||
roi := roi & { nsei };
|
||||
repeat;
|
||||
}
|
||||
}
|
||||
|
||||
/* reset the signaling BVC from the SGSN; expect all signaling BVC on all BSS to be reset */
|
||||
testcase TC_bvc_reset_sig_from_sgsn() runs on test_CT {
|
||||
|
||||
f_init();
|
||||
f_sleep(3.0);
|
||||
|
||||
SGSN_MGMT.clear;
|
||||
PCU_MGMT.clear;
|
||||
|
||||
/* Start BVC-RESET procedure for BVCI=0 */
|
||||
SGSN_MGMT.send(BssgpResetRequest:{cause:=BSSGP_CAUSE_OM_INTERVENTION}) to g_sgsn[0].vc_BSSGP;
|
||||
|
||||
/* Defaults match in reverse activation order, this one is a catch-all for Status indications
|
||||
* and reset indications sent from other components (like the ptp_bvcs). If we don't drain
|
||||
* the port and a different message sits at the front we wait forever and fail the test.
|
||||
*/
|
||||
var ro_default defaults := { activate(as_ignore_mgmt(PCU_MGMT)) };
|
||||
|
||||
/* Activate altsteps: One for each PCU NSE */
|
||||
var ro_default defaults := {};
|
||||
for (var integer i := 0; i < lengthof(g_pcu); i := i+1) {
|
||||
var NSConfiguration nscfg := mp_nsconfig_pcu[i];
|
||||
var default d := activate(as_count_bvc0_block(i, nscfg.nsei, g_roi));
|
||||
|
|
Loading…
Reference in New Issue