[gnome-bluetooth/wip/hadess/fixes: 6/6] tests: Avoid race in test_connectable_devices




commit e018150304cf0c329d4fc829d4576caa6ce41226
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Aug 9 15:04:36 2022 +0200

    tests: Avoid race in test_connectable_devices
    
    Traceback (most recent call last):
      File "/builds/GNOME/gnome-bluetooth/_build/../tests/integration-test.py", line 429, in 
test_connectable_devices
        self.assertEqual(list_store.get_n_items(), 3)
    AssertionError: 0 != 3

 tests/integration-test.py | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/tests/integration-test.py b/tests/integration-test.py
index 3f055599..e7ebf7ef 100755
--- a/tests/integration-test.py
+++ b/tests/integration-test.py
@@ -426,6 +426,7 @@ class OopTests(dbusmock.DBusTestCase):
 
         self.wait_for_mainloop()
         list_store = client.get_devices()
+        self.wait_for_condition(lambda: list_store.get_n_items() == 3)
         self.assertEqual(list_store.get_n_items(), 3)
 
         device = list_store.get_item(0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]