BSC_Tests: fix race conditions in TC_chan_alloc_algo_ass_dynamic

In cases a), b), c), d), and e) we're sending one or more Measurement
Reports via the A-bis/RSL, and then immediately triggering a traffic
channel assignment by calling f_TC_chan_alloc_algo(), which sends an
Assignment Request via the A interface.

The above-mentioned messages are sent immediately all together, so it
may happen that the BSC handles the Assignment Request earlier than
the Measurement Report(s).  In this case there will be no RxLev
samples, so the BSC would fall-back to ascending allocation order.

Recently we saw this race condition actually happening on Jenkins:

https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-bsc-test-sccplite/1583/

Let's introduce an artificial delay before sending the Assignment
Request, so that the BSC has enough time to process received MRs.

Change-Id: I2fd6508488e935d208a7aba8e2f215b1cc14ad32
This commit is contained in:
Vadim Yanitskiy 2022-08-24 03:08:32 +07:00 committed by fixeria
parent 8b4e046b5d
commit 5f6dd352ea
1 changed files with 4 additions and 0 deletions

View File

@ -11666,6 +11666,7 @@ testcase TC_chan_alloc_algo_ass_dynamic() runs on test_CT {
f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 0, f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 0,
ts_RSL_IE_UplinkMeas(30, 0), ts_RSL_IE_UplinkMeas(30, 0),
ts_RSL_IE_BS_Power(0)), TRX0); ts_RSL_IE_BS_Power(0)), TRX0);
f_sleep(0.3); /* give the IUT some time to process sent MRs */
f_TC_chan_alloc_algo(dt, TRX0); f_TC_chan_alloc_algo(dt, TRX0);
f_perform_clear_test_ct(dt); f_perform_clear_test_ct(dt);
@ -11677,6 +11678,7 @@ testcase TC_chan_alloc_algo_ass_dynamic() runs on test_CT {
f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 1, f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 1,
ts_RSL_IE_UplinkMeas(48, 0), ts_RSL_IE_UplinkMeas(48, 0),
ts_RSL_IE_BS_Power(0)), TRX0); ts_RSL_IE_BS_Power(0)), TRX0);
f_sleep(0.3); /* give the IUT some time to process sent MRs */
f_TC_chan_alloc_algo(dt, TRX0); f_TC_chan_alloc_algo(dt, TRX0);
f_perform_clear_test_ct(dt); f_perform_clear_test_ct(dt);
@ -11688,6 +11690,7 @@ testcase TC_chan_alloc_algo_ass_dynamic() runs on test_CT {
f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 1, f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 1,
ts_RSL_IE_UplinkMeas(58, 0), ts_RSL_IE_UplinkMeas(58, 0),
ts_RSL_IE_BS_Power(0)), TRX0); ts_RSL_IE_BS_Power(0)), TRX0);
f_sleep(0.3); /* give the IUT some time to process sent MRs */
f_TC_chan_alloc_algo(dt, TRX3); f_TC_chan_alloc_algo(dt, TRX3);
f_perform_clear_test_ct(dt); f_perform_clear_test_ct(dt);
@ -11703,6 +11706,7 @@ testcase TC_chan_alloc_algo_ass_dynamic() runs on test_CT {
f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 1, f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 1,
ts_RSL_IE_UplinkMeas(58, 0), ts_RSL_IE_UplinkMeas(58, 0),
ts_RSL_IE_BS_Power(0)), TRX0); ts_RSL_IE_BS_Power(0)), TRX0);
f_sleep(0.3); /* give the IUT some time to process sent MRs */
f_TC_chan_alloc_algo(dt, TRX0); f_TC_chan_alloc_algo(dt, TRX0);
f_perform_clear_test_ct(dt); f_perform_clear_test_ct(dt);