ubuntu-apps-bugs team mailing list archive
-
ubuntu-apps-bugs team
-
Mailing list archive
-
Message #00842
[Bug 1287628] Re: invoke_incoming_call() doesn't seem to work, result is not checked, yet test_incoming test passes (?!)
Right, so dial-number fails in both python2 and python3 editions, the
later one is the only one that generates a whoopsie crash file.
bug 1287659
I'm thinking, instead of doing external call to dial-number, why can't
the AP tests themself do dbus call to ofono to invoke the callback?
Afterall dial-number script is not doing anything else...
** Changed in: ofono (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Apps bug tracking, which is subscribed to dialer-app in Ubuntu.
https://bugs.launchpad.net/bugs/1287628
Title:
invoke_incoming_call() doesn't seem to work, result is not checked,
yet test_incoming test passes (?!)
Status in Dialer app for Ubuntu Touch:
New
Status in “dialer-app” package in Ubuntu:
New
Status in “ofono” package in Ubuntu:
Invalid
Bug description:
Looking at the autopilot tests:
def invoke_incoming_call():
"""Invoke an incoming call for test purpose."""
# magic number 199 will cause a callback from 1234567; dialing 199
# itself will fail, so quiesce the error
subprocess.call(['/usr/share/ofono/scripts/dial-number', '199'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
That does not check that dial-number succeeded and did not generate
tracebacks.
Later, it is expected than incomming call is comming...
def test_incoming(self):
"""Incoming call"""
number = "1234567"
helpers.invoke_incoming_call()
# wait for incoming call, accept; it would be nicer to fake-click the
# popup notification, but as this isn't generated by dialer-app it
# isn't exposed to autopilot
helpers.wait_for_incoming_call()
time.sleep(1) # let's hear the ringing sound for a second :-)
subprocess.check_call(
[
"dbus-send", "--session", "--print-reply",
"--dest=com.canonical.Approver", "/com/canonical/Approver",
"com.canonical.TelephonyServiceApprover.AcceptCall"
], stdout=subprocess.PIPE)
# call back is from that number
self.assertThat(
self.main_view.live_call_page.title, Eventually(Equals(number)))
# stop watch should start counting
elapsed_time = self.main_view.live_call_page.get_elapsed_call_time()
self.assertIn("00:0", elapsed_time)
try:
self.main_view.live_call_page.click_hangup_button()
except MismatchError as e:
print('Expected failure due to known Mir crash '
'(https://launchpad.net/bugs/1240400): %s' % e)
This indicates there is a problem with a test (setup is not verified
that incoming call is actually there), and I'm not sure how the test
manages to pass.... by virtue of catching the MismatchError?
I'll be investigating further, to see if dial-number is getting
invoked correctly or not, and why it times out.
To manage notifications about this bug go to:
https://bugs.launchpad.net/dialer-app/+bug/1287628/+subscriptions
References