[gnome-bluetooth/wip/hadess/remove-gtk-tree: 16/19] tests: Verify values after wait_for_condition()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/remove-gtk-tree: 16/19] tests: Verify values after wait_for_condition()
- Date: Wed, 1 Dec 2021 16:43:24 +0000 (UTC)
commit 13588c96213587d339f83ce1cd9466a846eba79a
Author: Bastien Nocera <hadess hadess net>
Date: Wed Dec 1 17:31:48 2021 +0100
tests: Verify values after wait_for_condition()
Since we made it possible for wait_for_condition() to return before the
condition was actually reached, to avoid build system test timeout, make
sure to double-check the conditions we're waiting for were actually
achieved.
tests/integration-test | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/tests/integration-test b/tests/integration-test
index 824e2618..131dcfe4 100755
--- a/tests/integration-test
+++ b/tests/integration-test
@@ -96,6 +96,7 @@ class OopTests(dbusmock.DBusTestCase):
def test_one_device(self):
self.wait_for_condition(lambda: self.client.props.num_adapters != 0)
+ self.assertEqual(self.client.props.num_adapters, 1)
# GListStore
list_store = self.client.get_devices()
@@ -126,6 +127,7 @@ class OopTests(dbusmock.DBusTestCase):
'Connected': True,
})
self.wait_for_condition(lambda: received_notification == True)
+ self.assertEqual(received_notification, True)
self.assertEqual(device.props.connected, True)
def test_device_removal(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]