[gnome-bluetooth/wip/hadess/remove-gtk-tree: 2/18] tests: Verify values after wait_for_condition()




commit 095e2b93b25b56ce30f1a928c3ee406dc72d479f
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 7c9a823d..aa94d156 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]