From 453cac385fcfb8b20c685c8de554ec5cce8b3006 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 27 Jun 2014 20:20:21 +0200 Subject: [PATCH] * automated/dbus-tests.el (dbus--test-register-service) (dbus-test02-register-service-session): Replace `dbus-ping' calls by `dbus-list-known-names'. Fixes: debbugs:17858 --- test/ChangeLog | 6 ++++++ test/automated/dbus-tests.el | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/test/ChangeLog b/test/ChangeLog index 3bd41a22964..76e9d3e8101 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2014-06-27 Michael Albinus + + * automated/dbus-tests.el (dbus--test-register-service) + (dbus-test02-register-service-session): Replace `dbus-ping' calls + by `dbus-list-known-names'. (Bug#17858) + 2014-06-25 Stefan Monnier * automated/package-test.el (package-test-update-listing) diff --git a/test/automated/dbus-tests.el b/test/automated/dbus-tests.el index c9d9c72ec1d..1af5c77de53 100644 --- a/test/automated/dbus-tests.el +++ b/test/automated/dbus-tests.el @@ -88,15 +88,15 @@ ;; Register an own service. (should (eq (dbus-register-service bus dbus-service-emacs) :primary-owner)) - (should (dbus-ping bus dbus-service-emacs 100)) + (should (member dbus-service-emacs (dbus-list-known-names bus))) (should (eq (dbus-register-service bus dbus-service-emacs) :already-owner)) - (should (dbus-ping bus dbus-service-emacs 100)) + (should (member dbus-service-emacs (dbus-list-known-names bus))) ;; Unregister the service. (should (eq (dbus-unregister-service bus dbus-service-emacs) :released)) - (should-not (dbus-ping bus dbus-service-emacs 100)) + (should-not (member dbus-service-emacs (dbus-list-known-names bus))) (should (eq (dbus-unregister-service bus dbus-service-emacs) :non-existent)) - (should-not (dbus-ping bus dbus-service-emacs 100)) + (should-not (member dbus-service-emacs (dbus-list-known-names bus))) ;; `dbus-service-dbus' is reserved for the BUS itself. (should-error (dbus-register-service bus dbus-service-dbus)) @@ -109,7 +109,7 @@ (dbus--test-register-service :session) (let ((service "org.freedesktop.Notifications")) - (when (dbus-ping :session service 100) + (when (member service (dbus-list-known-names :session)) ;; Cleanup. (dbus-ignore-errors (dbus-unregister-service :session service))