From b9dfa1a141c59fb9406a596b00a07478bc515000 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 31 Aug 2022 13:16:03 +1200 Subject: [PATCH] Fix flaky file chooser test Fixes https://github.com/canonical/xdg_desktop_portal.dart/issues/75 --- test/xdg_desktop_portal_test.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/xdg_desktop_portal_test.dart b/test/xdg_desktop_portal_test.dart index be27c59..1060388 100644 --- a/test/xdg_desktop_portal_test.dart +++ b/test/xdg_desktop_portal_test.dart @@ -1989,8 +1989,7 @@ void main() { await portalServer.close(); }); - var busClient = DBusClient(clientAddress); - var client = XdgDesktopPortalClient(bus: busClient); + var client = XdgDesktopPortalClient(bus: DBusClient(clientAddress)); addTearDown(() async { await client.close(); }); @@ -1999,7 +1998,7 @@ void main() { var subscription = stream.listen(expectAsync1((result) {}, count: 0)); // Ensure that the session has been created and then check for it. - await busClient.ping(); + await client.fileChooser.getVersion(); expect(portalServer.openFileDialogs, hasLength(1)); // Ensure the dialog is removed when the request is cancelled.