gbproxy: Fail on timeout in f_send_paging_xs_exp_one_bss
These functions would not set a verdict in case no message was ever
received. This patch ensures that a timeout while waiting for a paging
message actually fails the test.
Change-Id: If71db2d37d67d02c5d9550202128ee3470762964
Related: SYS#5002
diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 1430af0..31cb465 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -1146,6 +1146,7 @@
boolean use_sig := false,integer pcu_idx := 0)
runs on BSSGP_ConnHdlr {
var template (present) PDU_BSSGP exp_rx;
+ var boolean test_done := false;
/* doesn't really make sense: Sending to a single BVCI means the message ends up
* at that BVC (cell) only, and paging all over the BSS area is not possible */
exp_rx := f_send_paging_ps(p4, sgsn_idx, use_sig);
@@ -1153,15 +1154,17 @@
timer T := 2.0;
T.start;
alt {
- [not use_sig] PCU[pcu_idx].receive(exp_rx) {
+ [not use_sig and not test_done] PCU[pcu_idx].receive(exp_rx) {
setverdict(pass);
+ test_done := true;
repeat;
}
[not use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {
setverdict(fail, "Received paging on SIGNALING BVC, expected PTP BVC");
}
- [use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {
+ [use_sig and not test_done] PCU_SIG[pcu_idx].receive(exp_rx) {
setverdict(pass);
+ test_done := true;
repeat;
}
[use_sig] PCU[pcu_idx].receive(exp_rx) {
@@ -1179,7 +1182,10 @@
[] any from PCU_SIG.receive(PDU_BSSGP:{pDU_BSSGP_PAGING_PS:=?}) {
setverdict(fail, "Different Paging than expected on SIGNALING BVC");
}
- [] T.timeout;
+ [not test_done] T.timeout {
+ setverdict(fail, "Timeout waiting for paging");
+ }
+ [test_done] T.timeout;
}
}
@@ -1561,6 +1567,7 @@
boolean use_sig := false,integer pcu_idx := 0)
runs on BSSGP_ConnHdlr {
var template (present) PDU_BSSGP exp_rx;
+ var boolean test_done := false;
/* doesn't really make sense: Sending to a single BVCI means the message ends up
* at that BVC (cell) only, and paging all over the BSS area is not possible */
exp_rx := f_send_paging_cs(p4, sgsn_idx, use_sig);
@@ -1568,15 +1575,17 @@
timer T := 2.0;
T.start;
alt {
- [not use_sig] PCU[pcu_idx].receive(exp_rx) {
+ [not use_sig and not test_done] PCU[pcu_idx].receive(exp_rx) {
setverdict(pass);
+ test_done := true;
repeat;
}
[not use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {
setverdict(fail, "Received paging on SIGNALING BVC, expected PTP BVC");
}
- [use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {
+ [use_sig and not test_done] PCU_SIG[pcu_idx].receive(exp_rx) {
setverdict(pass);
+ test_done := true;
repeat;
}
[use_sig] PCU[pcu_idx].receive(exp_rx) {
@@ -1594,7 +1603,10 @@
[] any from PCU_SIG.receive(PDU_BSSGP:{pDU_BSSGP_PAGING_CS:=?}) {
setverdict(fail, "Different Paging than expected on SIGNALING BVC");
}
- [] T.timeout;
+ [not test_done] T.timeout {
+ setverdict(fail, "Timeout while waiting for paging")
+ }
+ [test_done] T.timeout;
}
}