aboutsummaryrefslogtreecommitdiffstats
path: root/suites
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-08-02 13:08:35 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-11-06 17:44:42 +0100
commit2d9c14aeb93ad8158a4657441a67fe8cb3c1d7a5 (patch)
tree279397946e4820ef371c20e102a3f5bae0e23700 /suites
parent03983aace2f4e75b7a940e6bb78de2155a7ab114 (diff)
ussd: Workaround ofono issue to prevent test failure
Diffstat (limited to 'suites')
-rwxr-xr-xsuites/aoip_ussd/assert_extension.py10
-rwxr-xr-xsuites/ussd/assert_extension.py10
2 files changed, 20 insertions, 0 deletions
diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py
index da5dad3..5e934db 100755
--- a/suites/aoip_ussd/assert_extension.py
+++ b/suites/aoip_ussd/assert_extension.py
@@ -31,6 +31,16 @@ print('waiting for modems to attach...')
wait(ms.is_connected, msc.mcc_mnc())
wait(msc.subscriber_attached, ms)
+# ofono (qmi) currently changes state to 'registered' jut after sending
+# 'Location Update Request', but before receiving 'Location Updating Accept'.
+# Which means we can reach lines below and send USSD code while still not being
+# attached, which will then fail. See OsmoGsmTester #2239 for more detailed
+# information.
+# Until we find an ofono fix or a better way to workaround this, let's just
+# sleep for a while in order to receive the 'Location Updating Accept' message
+# before attemting to send the USSD.
+sleep(10)
+
print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION)
response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION)
assert ' ' + ms.msisdn + '\r' in response
diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py
index 4e2e0e1..717c58d 100755
--- a/suites/ussd/assert_extension.py
+++ b/suites/ussd/assert_extension.py
@@ -21,6 +21,16 @@ print('waiting for modems to attach...')
wait(ms.is_connected, nitb.mcc_mnc())
wait(nitb.subscriber_attached, ms)
+# ofono (qmi) currently changes state to 'registered' jut after sending
+# 'Location Update Request', but before receiving 'Location Updating Accept'.
+# Which means we can reach lines below and send USSD code while still not being
+# attached, which will then fail. See OsmoGsmTester #2239 for more detailed
+# information.
+# Until we find an ofono fix or a better way to workaround this, let's just
+# sleep for a while in order to receive the 'Location Updating Accept' message
+# before attemting to send the USSD.
+sleep(10)
+
print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION)
response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION)
assert ' ' + ms.msisdn + '\r' in response