pespin has uploaded this change for review.

View Change

hnbgw: Use Misc_Helpers.f_shutdown upon rx of unexpected msg

Otherwise the test continues for a while and ends up with a DTE which
makes it harder to figure out the original test failure.

Change-Id: I7f07cff2ce93e8b11338ba4e39e1d49662323f58
---
M hnbgw/ConnHdlr.ttcn
1 file changed, 10 insertions(+), 10 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/39483/1
diff --git a/hnbgw/ConnHdlr.ttcn b/hnbgw/ConnHdlr.ttcn
index dec5463..47c25a7 100644
--- a/hnbgw/ConnHdlr.ttcn
+++ b/hnbgw/ConnHdlr.ttcn
@@ -335,13 +335,13 @@
[] BSSAP.receive(exp_rx) -> value rx {
setverdict(pass);
}
- [] BSSAP.receive(RANAP_PDU:?) {
- setverdict(fail, "Got an unexpected RANAP message on BSSAP port, was waiting for ", exp_rx);
- mtc.stop;
+ [] BSSAP.receive(RANAP_PDU:?) -> value rx {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Got an unexpected RANAP message on BSSAP port: ", rx, " vs exp ", exp_rx));
}
[] T.timeout {
- setverdict(fail, "Timeout waiting for RANAP on BSSAP port: ", exp_rx);
- mtc.stop;
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Timeout waiting for RANAP on BSSAP port: ", exp_rx));
}
}
T.stop;
@@ -385,13 +385,13 @@
[] RUA.receive(exp_rx) -> value rx {
setverdict(pass);
}
- [] RUA.receive(RANAP_PDU:?) {
- setverdict(fail, "Got an unexpected RUA message, was waiting for ", exp_rx);
- mtc.stop;
+ [] RUA.receive(RANAP_PDU:?) -> value rx {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Got an unexpected RUA message: ", rx, " vs exp ", exp_rx));
}
[] T.timeout {
- setverdict(fail, "Timeout waiting for Iuh ", exp_rx);
- mtc.stop;
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Timeout waiting for Iuh ", exp_rx));
}
}
T.stop;

To view, visit change 39483. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7f07cff2ce93e8b11338ba4e39e1d49662323f58
Gerrit-Change-Number: 39483
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>