[gnome-bluetooth/wip/hadess/test-fix: 2/2] tests: Fix old default adapter reinsertion test




commit bf7dc39fbc4df633a57fbe398a6d8cc654659418
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 5 14:10:03 2022 +0100

    tests: Fix old default adapter reinsertion test
    
    We weren't waiting for a mainloop update, so the newly added adapter
    never got processed.

 tests/integration-test | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/tests/integration-test b/tests/integration-test
index 9355bc87..c6798ef5 100755
--- a/tests/integration-test
+++ b/tests/integration-test
@@ -228,6 +228,8 @@ class OopTests(dbusmock.DBusTestCase):
 
         # Re-add the old adapter, device is still there
         dbusmock_bluez.AddAdapter('hci1', 'hci1')
+        self.wait_for_condition(lambda: self.client.props.num_adapters == 2)
+        self.assertEqual(self.client.props.num_adapters, 2)
 
         # GListModel
         self.assertEqual(list_store.get_n_items(), 1)


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