BSC_Tests: Avoid race condition with OML
We use the "oml-connection-status == degraded" to determine if
the OML connection has been brought up by the external helper.
However, this status is advertised from the moment the ID_ACK was
issued on the OML connection, and *not* only from the moment on
when we're expecting the RSL connection (after initializing all MO).
Let's introduce some delay to avoid running into a race condition here.
The proper solution is to implement OML inside the test suite, which
is too large of a task to be done right now, where the focus is on
RSL+BSSAP testing.
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index b41179d..9cc6656 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -131,9 +131,13 @@
while (true) {
if (f_ctrl_get_bts(IPA_CTRL, bts_nr, "oml-connection-state") == status) {
T.stop;
+ /* the 'degraded' state exists from OML connection time, and we have to wait
+ * until all MO's are initialized */
+ T.start(1.0);
+ T.timeout;
return;
}
- f_sleep(0.1);
+ f_sleep(0.5);
if (not T.running) {
setverdict(fail, "Timeout waiting for oml-connection-state ", status);
self.stop;