summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-01-31 19:45:38 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-01 12:06:52 +0000
commita09adf6dd3b5a79e3b7206d563d97125b4f5b6e6 (patch)
tree73b042e26fa910914a424765b2f8ea03feea82ee
parentdbfd20b0d78e5cdd1ef7ab005d3894c62748b671 (diff)
Replace nearly all calls to tp_cli_connection_run_disconnect
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45459
-rw-r--r--tests/dbus/account-channel-request.c4
-rw-r--r--tests/dbus/base-client.c4
-rw-r--r--tests/dbus/call-example.c3
-rw-r--r--tests/dbus/callable-example.c3
-rw-r--r--tests/dbus/channel-dispatch-operation.c3
-rw-r--r--tests/dbus/channel-introspect.c3
-rw-r--r--tests/dbus/channel-manager-request-properties.c3
-rw-r--r--tests/dbus/channel-request.c4
-rw-r--r--tests/dbus/channel.c4
-rw-r--r--tests/dbus/cli-group.c3
-rw-r--r--tests/dbus/client-channel-factory.c4
-rw-r--r--tests/dbus/cm-message.c4
-rw-r--r--tests/dbus/connection-aliasing.c4
-rw-r--r--tests/dbus/connection-balance.c4
-rw-r--r--tests/dbus/connection-bug-18845.c4
-rw-r--r--tests/dbus/connection-handles.c4
-rw-r--r--tests/dbus/connection-inject-bug16307.c3
-rw-r--r--tests/dbus/connection-interests.c4
-rw-r--r--tests/dbus/connection.c4
-rw-r--r--tests/dbus/contact-list-client.c4
-rw-r--r--tests/dbus/contact-lists.c9
-rw-r--r--tests/dbus/contacts-bug-19101.c4
-rw-r--r--tests/dbus/contacts-mixin.c4
-rw-r--r--tests/dbus/contacts-slow-path.c7
-rw-r--r--tests/dbus/contacts.c19
-rw-r--r--tests/dbus/dbus-tube.c4
-rw-r--r--tests/dbus/file-transfer-channel.c4
-rw-r--r--tests/dbus/group-mixin.c3
-rw-r--r--tests/dbus/message-mixin.c3
-rw-r--r--tests/dbus/proxy-preparation.c5
-rw-r--r--tests/dbus/self-handle.c7
-rw-r--r--tests/dbus/self-presence.c4
-rw-r--r--tests/dbus/simple-approver.c4
-rw-r--r--tests/dbus/simple-handler.c4
-rw-r--r--tests/dbus/simple-observer.c4
-rw-r--r--tests/dbus/stream-tube.c4
-rw-r--r--tests/dbus/text-channel.c4
-rw-r--r--tests/dbus/text-mixin.c3
-rw-r--r--tests/dbus/text-respawn.c3
39 files changed, 44 insertions, 128 deletions
diff --git a/tests/dbus/account-channel-request.c b/tests/dbus/account-channel-request.c
index e88afb4aa..ae899a30a 100644
--- a/tests/dbus/account-channel-request.c
+++ b/tests/dbus/account-channel-request.c
@@ -141,9 +141,7 @@ teardown (Test *test,
tp_clear_object (&test->channel);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
tp_clear_object (&test->connection);
tp_clear_object (&test->base_connection);
diff --git a/tests/dbus/base-client.c b/tests/dbus/base-client.c
index a8cfd426d..b3a50af88 100644
--- a/tests/dbus/base-client.c
+++ b/tests/dbus/base-client.c
@@ -261,9 +261,7 @@ teardown (Test *test,
tp_clear_object (&test->cdo_service);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
diff --git a/tests/dbus/call-example.c b/tests/dbus/call-example.c
index 905a14c2e..dd84c11a2 100644
--- a/tests/dbus/call-example.c
+++ b/tests/dbus/call-example.c
@@ -1044,8 +1044,7 @@ static void
teardown (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- tp_cli_connection_run_disconnect (test->conn, -1, &test->error, NULL);
- g_assert_no_error (test->error);
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
if (test->members_changed_detailed_id != 0)
{
diff --git a/tests/dbus/callable-example.c b/tests/dbus/callable-example.c
index 72154514d..78faa4622 100644
--- a/tests/dbus/callable-example.c
+++ b/tests/dbus/callable-example.c
@@ -1500,8 +1500,7 @@ static void
teardown (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- tp_cli_connection_run_disconnect (test->conn, -1, &test->error, NULL);
- g_assert_no_error (test->error);
+ tp_tests_connection_assert_disconnect_succeeds (test->conn);
if (test->members_changed_detailed_id != 0)
{
diff --git a/tests/dbus/channel-dispatch-operation.c b/tests/dbus/channel-dispatch-operation.c
index 02be514df..3b62a81dc 100644
--- a/tests/dbus/channel-dispatch-operation.c
+++ b/tests/dbus/channel-dispatch-operation.c
@@ -217,8 +217,7 @@ teardown_services (Test *test,
if (test->text_chan_service_2 != NULL)
g_object_unref (test->text_chan_service_2);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
diff --git a/tests/dbus/channel-introspect.c b/tests/dbus/channel-introspect.c
index 5d3038102..484c7417a 100644
--- a/tests/dbus/channel-introspect.c
+++ b/tests/dbus/channel-introspect.c
@@ -758,8 +758,7 @@ main (int argc,
g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CHAT_STATES),
==, FALSE);
- MYASSERT (tp_cli_connection_run_disconnect (conn, -1, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
was_ready = FALSE;
diff --git a/tests/dbus/channel-manager-request-properties.c b/tests/dbus/channel-manager-request-properties.c
index 1b83c5dc7..97ff38c43 100644
--- a/tests/dbus/channel-manager-request-properties.c
+++ b/tests/dbus/channel-manager-request-properties.c
@@ -86,8 +86,7 @@ static void
teardown (Test *test,
gconstpointer data)
{
- g_assert (tp_cli_connection_run_disconnect (test->conn, -1, &test->error, NULL));
- g_assert_no_error (test->error);
+ tp_tests_connection_assert_disconnect_succeeds (test->conn);
g_object_unref (test->service_conn);
test->service_conn = NULL;
diff --git a/tests/dbus/channel-request.c b/tests/dbus/channel-request.c
index a56eccad8..fe6887d1c 100644
--- a/tests/dbus/channel-request.c
+++ b/tests/dbus/channel-request.c
@@ -107,9 +107,7 @@ static void
teardown (Test *test,
gconstpointer data)
{
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
diff --git a/tests/dbus/channel.c b/tests/dbus/channel.c
index de162a8ed..bbce71d63 100644
--- a/tests/dbus/channel.c
+++ b/tests/dbus/channel.c
@@ -147,9 +147,7 @@ teardown (Test *test,
tp_clear_object (&test->chan_contact_service);
tp_clear_object (&test->chan_room_service);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
diff --git a/tests/dbus/cli-group.c b/tests/dbus/cli-group.c
index b2b51f2a1..51326c9ee 100644
--- a/tests/dbus/cli-group.c
+++ b/tests/dbus/cli-group.c
@@ -536,8 +536,7 @@ main (int argc,
check_removed_unknown_error_in_invalidated ();
check_removed_known_error_in_invalidated ();
- MYASSERT (tp_cli_connection_run_disconnect (conn, -1, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
/* clean up */
diff --git a/tests/dbus/client-channel-factory.c b/tests/dbus/client-channel-factory.c
index 4b06e1509..70881cbef 100644
--- a/tests/dbus/client-channel-factory.c
+++ b/tests/dbus/client-channel-factory.c
@@ -100,9 +100,7 @@ teardown (Test *test,
tp_clear_object (&test->tube_chan_service);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
diff --git a/tests/dbus/cm-message.c b/tests/dbus/cm-message.c
index b9741baa6..7e5c7ec28 100644
--- a/tests/dbus/cm-message.c
+++ b/tests/dbus/cm-message.c
@@ -35,9 +35,7 @@ static void
teardown (Test *test,
gconstpointer data)
{
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
}
diff --git a/tests/dbus/connection-aliasing.c b/tests/dbus/connection-aliasing.c
index 55f1b1f14..ae10f9f08 100644
--- a/tests/dbus/connection-aliasing.c
+++ b/tests/dbus/connection-aliasing.c
@@ -112,9 +112,7 @@ teardown (Test *test,
g_assert (conn != NULL);
g_assert_no_error (error);
- ok = tp_cli_connection_run_disconnect (conn, -1, &error, NULL);
- g_assert (ok);
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
g_assert_error (error, TP_ERRORS, TP_ERROR_CANCELLED);
diff --git a/tests/dbus/connection-balance.c b/tests/dbus/connection-balance.c
index f099fee4e..b462a3ff8 100644
--- a/tests/dbus/connection-balance.c
+++ b/tests/dbus/connection-balance.c
@@ -258,9 +258,7 @@ teardown (Test *test,
g_assert (conn != NULL);
g_assert_no_error (error);
- ok = tp_cli_connection_run_disconnect (conn, -1, &error, NULL);
- g_assert (ok);
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
g_assert_error (error, TP_ERRORS, TP_ERROR_CANCELLED);
diff --git a/tests/dbus/connection-bug-18845.c b/tests/dbus/connection-bug-18845.c
index 2ce979f5d..0e7988467 100644
--- a/tests/dbus/connection-bug-18845.c
+++ b/tests/dbus/connection-bug-18845.c
@@ -108,9 +108,7 @@ main (int argc,
MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL), "");
g_assert_no_error (error);
- MYASSERT (tp_cli_connection_run_disconnect (conn, -1, &error, NULL), "");
- g_assert_no_error (error);
-
+ tp_tests_connection_assert_disconnect_succeeds (conn);
g_object_unref (conn);
service_conn_as_base = NULL;
diff --git a/tests/dbus/connection-handles.c b/tests/dbus/connection-handles.c
index f48e49e3c..a00aa6508 100644
--- a/tests/dbus/connection-handles.c
+++ b/tests/dbus/connection-handles.c
@@ -328,9 +328,7 @@ main (int argc,
/* Teardown */
- MYASSERT (tp_cli_connection_run_disconnect (client_conn, -1, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (client_conn);
service_conn_as_base = NULL;
g_object_unref (service_conn);
diff --git a/tests/dbus/connection-inject-bug16307.c b/tests/dbus/connection-inject-bug16307.c
index ca0a2e73f..827e4f26c 100644
--- a/tests/dbus/connection-inject-bug16307.c
+++ b/tests/dbus/connection-inject-bug16307.c
@@ -69,8 +69,7 @@ main (int argc,
"");
g_assert_no_error (error);
- MYASSERT (tp_cli_connection_run_disconnect (conn, -1, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
service_conn_as_base = NULL;
g_object_unref (service_conn);
diff --git a/tests/dbus/connection-interests.c b/tests/dbus/connection-interests.c
index 071981cd4..2cbb6be35 100644
--- a/tests/dbus/connection-interests.c
+++ b/tests/dbus/connection-interests.c
@@ -234,9 +234,7 @@ teardown (Test *test,
g_assert (conn != NULL);
g_assert_no_error (error);
- ok = tp_cli_connection_run_disconnect (conn, -1, &error, NULL);
- g_assert (ok);
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
g_assert_error (error, TP_ERRORS, TP_ERROR_CANCELLED);
diff --git a/tests/dbus/connection.c b/tests/dbus/connection.c
index b4dc04e9a..89fff10d8 100644
--- a/tests/dbus/connection.c
+++ b/tests/dbus/connection.c
@@ -97,9 +97,7 @@ teardown (Test *test,
g_assert (conn != NULL);
g_assert_no_error (error);
- ok = tp_cli_connection_run_disconnect (conn, -1, &error, NULL);
- g_assert (ok);
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
g_assert_error (error, TP_ERRORS, TP_ERROR_CANCELLED);
diff --git a/tests/dbus/contact-list-client.c b/tests/dbus/contact-list-client.c
index f9eeb6c1a..dcbe21226 100644
--- a/tests/dbus/contact-list-client.c
+++ b/tests/dbus/contact-list-client.c
@@ -87,9 +87,7 @@ teardown (Test *test,
g_main_loop_unref (test->mainloop);
test->mainloop = NULL;
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
diff --git a/tests/dbus/contact-lists.c b/tests/dbus/contact-lists.c
index 8b35a8775..6330935cb 100644
--- a/tests/dbus/contact-lists.c
+++ b/tests/dbus/contact-lists.c
@@ -474,9 +474,7 @@ teardown (Test *test,
&error);
g_assert (conn != NULL);
g_assert_no_error (error);
- ok = tp_cli_connection_run_disconnect (conn, -1, &error, NULL);
- g_assert (ok);
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
g_assert_error (error, TP_ERRORS, TP_ERROR_CANCELLED);
g_clear_error (&error);
@@ -2565,8 +2563,6 @@ static void
test_request_blocked_contacts_pre_connect (Test *test,
gconstpointer nil G_GNUC_UNUSED)
{
- gboolean ok;
-
/* This verifies that calling RequestBlockedContacts()
* before Connect(), when Connect() ultimately succeeds, returns correctly.
*/
@@ -2576,8 +2572,7 @@ test_request_blocked_contacts_pre_connect (Test *test,
tp_cli_connection_call_connect (test->conn, -1, NULL, NULL, NULL, NULL);
g_main_loop_run (test->main_loop);
- ok = tp_cli_connection_run_disconnect (test->conn, -1, NULL, NULL);
- g_assert (ok);
+ tp_tests_connection_assert_disconnect_succeeds (test->conn);
}
static void
diff --git a/tests/dbus/contacts-bug-19101.c b/tests/dbus/contacts-bug-19101.c
index a9db27c78..67a36c083 100644
--- a/tests/dbus/contacts-bug-19101.c
+++ b/tests/dbus/contacts-bug-19101.c
@@ -177,9 +177,7 @@ main (int argc,
/* Teardown */
- MYASSERT (tp_cli_connection_run_disconnect (client_conn, -1, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (client_conn);
g_object_unref (client_conn);
service_conn_as_base = NULL;
diff --git a/tests/dbus/contacts-mixin.c b/tests/dbus/contacts-mixin.c
index a2a88a551..1dabdef44 100644
--- a/tests/dbus/contacts-mixin.c
+++ b/tests/dbus/contacts-mixin.c
@@ -206,9 +206,7 @@ main (int argc,
/* Teardown */
- MYASSERT (tp_cli_connection_run_disconnect (client_conn, -1, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (client_conn);
service_conn_as_base = NULL;
g_object_unref (service_conn);
diff --git a/tests/dbus/contacts-slow-path.c b/tests/dbus/contacts-slow-path.c
index a75e40dd5..c5ab44a0e 100644
--- a/tests/dbus/contacts-slow-path.c
+++ b/tests/dbus/contacts-slow-path.c
@@ -1221,12 +1221,7 @@ teardown (Fixture *f,
gboolean ok;
if (f->legacy_client_conn != NULL)
- {
- ok = tp_cli_connection_run_disconnect (f->legacy_client_conn, -1,
- &error, NULL);
- g_assert_no_error (error);
- g_assert (ok);
- }
+ tp_tests_connection_assert_disconnect_succeeds (f->legacy_client_conn);
f->service_repo = NULL;
tp_clear_object (&f->legacy_client_conn);
diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c
index 987b90715..b4b5af91c 100644
--- a/tests/dbus/contacts.c
+++ b/tests/dbus/contacts.c
@@ -2886,11 +2886,7 @@ teardown (Fixture *f,
GError *error = NULL;
if (f->client_conn != NULL)
- {
- ok = tp_cli_connection_run_disconnect (f->client_conn, -1, &error, NULL);
- g_assert_no_error (error);
- g_assert (ok);
- }
+ tp_tests_connection_assert_disconnect_succeeds (f->client_conn);
tp_clear_object (&f->client_conn);
f->service_repo = NULL;
@@ -2898,22 +2894,15 @@ teardown (Fixture *f,
tp_clear_object (&f->base_connection);
if (f->legacy_client_conn != NULL)
- {
- ok = tp_cli_connection_run_disconnect (f->legacy_client_conn, -1, &error,
- NULL);
- g_assert_no_error (error);
- g_assert (ok);
- }
+ tp_tests_connection_assert_disconnect_succeeds (f->legacy_client_conn);
tp_clear_object (&f->legacy_client_conn);
tp_clear_object (&f->legacy_base_connection);
if (f->no_requests_client_conn != NULL)
{
- ok = tp_cli_connection_run_disconnect (f->no_requests_client_conn, -1,
- &error, NULL);
- g_assert_no_error (error);
- g_assert (ok);
+ tp_tests_connection_assert_disconnect_succeeds (
+ f->no_requests_client_conn);
}
tp_clear_object (&f->no_requests_client_conn);
diff --git a/tests/dbus/dbus-tube.c b/tests/dbus/dbus-tube.c
index 62a54d233..97fb9a489 100644
--- a/tests/dbus/dbus-tube.c
+++ b/tests/dbus/dbus-tube.c
@@ -63,9 +63,7 @@ teardown (Test *test,
tp_clear_object (&test->tube_chan_service);
tp_clear_object (&test->tube);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
}
diff --git a/tests/dbus/file-transfer-channel.c b/tests/dbus/file-transfer-channel.c
index f1b7376a9..641264c18 100644
--- a/tests/dbus/file-transfer-channel.c
+++ b/tests/dbus/file-transfer-channel.c
@@ -256,9 +256,7 @@ teardown (Test *test,
tp_clear_object (&test->chan_service);
tp_clear_object (&test->cm_stream);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
diff --git a/tests/dbus/group-mixin.c b/tests/dbus/group-mixin.c
index 40f19566d..84d29a5fc 100644
--- a/tests/dbus/group-mixin.c
+++ b/tests/dbus/group-mixin.c
@@ -578,8 +578,7 @@ main (int argc,
test_group_mixin ();
- MYASSERT (tp_cli_connection_run_disconnect (conn, -1, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
/* clean up */
diff --git a/tests/dbus/message-mixin.c b/tests/dbus/message-mixin.c
index f57fc52e3..d3b914b27 100644
--- a/tests/dbus/message-mixin.c
+++ b/tests/dbus/message-mixin.c
@@ -1093,8 +1093,7 @@ main (int argc,
g_print ("\n\n==== End of tests ====\n");
- MYASSERT (tp_cli_connection_run_disconnect (conn, -1, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
g_object_unref (chan);
g_object_unref (conn);
diff --git a/tests/dbus/proxy-preparation.c b/tests/dbus/proxy-preparation.c
index c331030a9..cf8828adf 100644
--- a/tests/dbus/proxy-preparation.c
+++ b/tests/dbus/proxy-preparation.c
@@ -52,9 +52,8 @@ setup (Test *test,
static void
disconnect_and_destroy_conn (Test *test)
{
- tp_cli_connection_run_disconnect (TP_CONNECTION (test->my_conn), -1,
- &test->error, NULL);
- g_assert_no_error (test->error);
+ tp_tests_connection_assert_disconnect_succeeds (
+ TP_CONNECTION (test->my_conn));
tp_clear_object (&test->connection);
tp_clear_object (&test->base_connection);
diff --git a/tests/dbus/self-handle.c b/tests/dbus/self-handle.c
index ef55e0955..703d8cb79 100644
--- a/tests/dbus/self-handle.c
+++ b/tests/dbus/self-handle.c
@@ -330,12 +330,7 @@ teardown (Fixture *f,
g_clear_error (&f->error);
if (f->client_conn != NULL)
- {
- ok = tp_cli_connection_run_disconnect (f->client_conn, -1, &f->error,
- NULL);
- g_assert_no_error (f->error);
- g_assert (ok);
- }
+ tp_tests_connection_assert_disconnect_succeeds (f->client_conn);
tp_clear_object (&f->result);
tp_clear_object (&f->client_conn);
diff --git a/tests/dbus/self-presence.c b/tests/dbus/self-presence.c
index d4c4e8690..239ca2df6 100644
--- a/tests/dbus/self-presence.c
+++ b/tests/dbus/self-presence.c
@@ -288,9 +288,7 @@ main (int argc,
/* Teardown */
- MYASSERT (tp_cli_connection_run_disconnect (client_conn, -1, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (client_conn);
g_object_unref (client_conn);
service_conn_as_base = NULL;
diff --git a/tests/dbus/simple-approver.c b/tests/dbus/simple-approver.c
index 7cac3b128..053e98761 100644
--- a/tests/dbus/simple-approver.c
+++ b/tests/dbus/simple-approver.c
@@ -159,9 +159,7 @@ teardown (Test *test,
g_object_unref (test->cdo_service);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
}
diff --git a/tests/dbus/simple-handler.c b/tests/dbus/simple-handler.c
index 3719e1a27..5134117b5 100644
--- a/tests/dbus/simple-handler.c
+++ b/tests/dbus/simple-handler.c
@@ -151,9 +151,7 @@ teardown (Test *test,
g_object_unref (test->text_chan_service);
g_object_unref (test->text_chan);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
}
diff --git a/tests/dbus/simple-observer.c b/tests/dbus/simple-observer.c
index 09c893a11..cc1e43e71 100644
--- a/tests/dbus/simple-observer.c
+++ b/tests/dbus/simple-observer.c
@@ -127,9 +127,7 @@ teardown (Test *test,
g_object_unref (test->text_chan_service);
g_object_unref (test->text_chan);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
}
diff --git a/tests/dbus/stream-tube.c b/tests/dbus/stream-tube.c
index ccec0cef6..f2c98c5c7 100644
--- a/tests/dbus/stream-tube.c
+++ b/tests/dbus/stream-tube.c
@@ -107,9 +107,7 @@ teardown (Test *test,
tp_clear_object (&test->tube_conn);
tp_clear_object (&test->cm_stream);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
}
diff --git a/tests/dbus/text-channel.c b/tests/dbus/text-channel.c
index 1a64ce2ff..8b0f34f20 100644
--- a/tests/dbus/text-channel.c
+++ b/tests/dbus/text-channel.c
@@ -136,9 +136,7 @@ teardown (Test *test,
tp_clear_object (&test->chan_service);
tp_clear_object (&test->sms_chan_service);
- tp_cli_connection_run_disconnect (test->connection, -1, &test->error, NULL);
- g_assert_no_error (test->error);
-
+ tp_tests_connection_assert_disconnect_succeeds (test->connection);
g_object_unref (test->connection);
g_object_unref (test->base_connection);
diff --git a/tests/dbus/text-mixin.c b/tests/dbus/text-mixin.c
index 0f012e0bf..114654b73 100644
--- a/tests/dbus/text-mixin.c
+++ b/tests/dbus/text-mixin.c
@@ -302,8 +302,7 @@ main (int argc,
g_print ("\n\n==== End of tests ====\n");
- MYASSERT (tp_cli_connection_run_disconnect (conn, -1, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
tp_handle_unref (contact_repo, handle);
g_object_unref (chan);
diff --git a/tests/dbus/text-respawn.c b/tests/dbus/text-respawn.c
index 5146b3236..0a6d8e5a4 100644
--- a/tests/dbus/text-respawn.c
+++ b/tests/dbus/text-respawn.c
@@ -249,8 +249,7 @@ main (int argc,
g_print ("\n\n==== End of tests ====\n");
- MYASSERT (tp_cli_connection_run_disconnect (conn, -1, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_connection_assert_disconnect_succeeds (conn);
tp_handle_unref (contact_repo, handle);
g_object_unref (chan);