summaryrefslogtreecommitdiffstats
path: root/bsc/BSC_Tests.ttcn
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2018-07-30 09:22:40 +0200
committerDaniel Willmann <dwillmann@sysmocom.de>2018-07-31 08:25:13 +0200
commitcbef398fe8c907dd847e7f3c364d27722f1ecf4a (patch)
tree754498a6147b2a6b6a2573f97c161384d64c70ac /bsc/BSC_Tests.ttcn
parent2daf52d3a3e2bca45a1157c4f06b1cfe69ef1c7a (diff)
BSC_Tests: Avoid race condition between paging cmd and reset ack
Sometimes (under heavy load and when the last paging cmd arrives near the reset ack) some messages are not enqueued in the IPA_RSL port after we have received the reset ack from BSSAP. In the failures I have seen wireshark reports that no paging cmd arrived after the reset ack, see jenkins job 285: https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-bsc-test/285/ Adding a sleep is always a bit crude, but since the paging cmd is scheduled through TCP while the reset ack is sent through sctp I don't see another way. Running the test under load in a loop showed improvements where I was not able to reproduce the failure with this patch. Change-Id: Ib2d60e2c59baf98e437e078d844adcc6dbdbfcd8
Diffstat (limited to 'bsc/BSC_Tests.ttcn')
-rw-r--r--bsc/BSC_Tests.ttcn4
1 files changed, 4 insertions, 0 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index c802a6b..5af4573 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1390,6 +1390,10 @@ testcase TC_paging_imsi_a_reset() runs on test_CT {
[] BSSAP.receive { repeat; }
}
+ /* Wait to avoid a possible race condition if a paging message is
+ * received right before the reset ACK. */
+ f_sleep(0.2);
+
/* Clear the queue, it might still contain stuff like BCCH FILLING */
for (var integer i := 0; i < sizeof(IPA_RSL); i := i+1) {
IPA_RSL[i].clear;