summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2013-05-02 01:09:02 -0700
committerPatrick Ohly <patrick.ohly@intel.com>2013-05-13 17:49:50 +0200
commit4661a721c36478395f2ff9ae81942497ae828d4a (patch)
treec63f16dcf7bc3def79ed3c8e6acfb50de6f19cc2 /test
parent83a0c05763661d390fa61855b271bc990384798a (diff)
D-Bus testing: remove timeout in TestSessionAPIsDummy.testInteractivePassword
The timeout kept firing and showed up in other tests when those timed out, which was very confusing. Had no negative impact otherwise.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-dbus.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/test-dbus.py b/test/test-dbus.py
index ce86d047..5fa14857 100755
--- a/test/test-dbus.py
+++ b/test/test-dbus.py
@@ -2807,13 +2807,15 @@ class TestSessionAPIsDummy(DBusUtil, unittest.TestCase):
# Kill again soon.
return True
- timeout_handler = Timeout.addTimeout(1, callback)
+ try:
+ timeout_handler = Timeout.addTimeout(1, callback)
- # try to sync and invoke password request
- self.session.Sync("", {})
- loop.run()
- Timeout.removeTimeout(timeout_handler)
- self.assertEqual(self.lastState, "done")
+ # try to sync and invoke password request
+ self.session.Sync("", {})
+ loop.run()
+ self.assertEqual(self.lastState, "done")
+ finally:
+ Timeout.removeTimeout(timeout_handler)
def doAutoSyncNetworkFailure(self):
"""TestSessionAPIsDummy.testAutoSyncNetworkFailure - test that auto-sync is triggered, fails due to (temporary?!) network error here"""