[next] telepathy-glib: Remove unit test for bug 18845
Xavier Claessens
xclaesse at kemper.freedesktop.org
Fri Jun 8 08:11:22 PDT 2012
Module: telepathy-glib
Branch: next
Commit: 9f9ffb5c5b38cec9f201178adf3b07487f92d8ec
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=9f9ffb5c5b38cec9f201178adf3b07487f92d8ec
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Fri Jun 8 14:33:59 2012 +0200
Remove unit test for bug 18845
It's about handle refcounting which does not exist anymore, and involves
RequestHandles which does not exist anymore
---
tests/dbus/Makefile.am | 3 -
tests/dbus/connection-bug-18845.c | 107 -------------------------------------
2 files changed, 0 insertions(+), 110 deletions(-)
diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am
index d5213c5..c1146a1 100644
--- a/tests/dbus/Makefile.am
+++ b/tests/dbus/Makefile.am
@@ -19,7 +19,6 @@ tests_list = \
test-connection \
test-connection-aliasing \
test-connection-balance \
- test-connection-bug-18845 \
test-connection-error \
test-connection-interests \
test-contact-lists \
@@ -148,8 +147,6 @@ test_connection_aliasing_LDADD = \
test_connection_balance_SOURCES = connection-balance.c
-test_connection_bug_18845_SOURCES = connection-bug-18845.c
-
test_connection_error_SOURCES = connection-error.c
test_connection_interests_SOURCES = connection-interests.c
diff --git a/tests/dbus/connection-bug-18845.c b/tests/dbus/connection-bug-18845.c
deleted file mode 100644
index ba93635..0000000
--- a/tests/dbus/connection-bug-18845.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Regression test for https://bugs.freedesktop.org/show_bug.cgi?id=18845
- *
- * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2008 Nokia Corporation
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#include "config.h"
-
-#include <telepathy-glib/cli-connection.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/proxy-subclass.h>
-
-#include "telepathy-glib/reentrants.h"
-
-#include "tests/lib/myassert.h"
-#include "tests/lib/contacts-conn.h"
-#include "tests/lib/util.h"
-
-static GMainLoop *mainloop;
-
-static GError invalidated_for_test = { 0, TP_ERROR_PERMISSION_DENIED,
- "No connection for you!" };
-
-static gboolean
-no_more_idling_around (gpointer data)
-{
- g_main_loop_quit (data);
- return FALSE;
-}
-
-int
-main (int argc,
- char **argv)
-{
- TpDBusDaemon *dbus;
- TpTestsSimpleConnection *service_conn;
- TpBaseConnection *service_conn_as_base;
- GError *error = NULL;
- TpConnection *conn;
- DBusGProxy *proxy;
-
- tp_tests_abort_after (10);
- g_type_init ();
- invalidated_for_test.domain = TP_ERROR;
-
- tp_debug_set_flags ("all");
- mainloop = g_main_loop_new (NULL, FALSE);
- dbus = tp_tests_dbus_daemon_dup_or_die ();
-
- tp_tests_create_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION, "me at example.com",
- TRUE, &service_conn_as_base, &conn);
- service_conn = TP_TESTS_SIMPLE_CONNECTION (service_conn_as_base);
-
- {
- const gchar *ids[] = {
- "flarglybadger",
- NULL
- };
- GArray *handles = NULL;
-
- MYASSERT (tp_cli_connection_run_request_handles (conn, -1,
- TP_HANDLE_TYPE_CONTACT, ids, &handles, &error, NULL), "");
- g_assert_no_error (error);
-
- g_array_unref (handles);
- }
-
- /* The bug was in cleaning up handle refs when the CM fell off the bus.
- * Emitting "destroy" on the proxy simulates the CM falling off the bus.
- */
- proxy = tp_proxy_borrow_interface_by_id ((TpProxy *) conn,
- TP_IFACE_QUARK_CONNECTION, &error);
- g_assert_no_error (error);
- g_signal_emit_by_name (proxy, "destroy");
-
- g_idle_add_full (G_PRIORITY_LOW, no_more_idling_around, mainloop, NULL);
-
- g_main_loop_run (mainloop);
-
- g_object_unref (conn);
-
- /* Make a new connection proxy so that we can call Disconnect() on the
- * connection.
- */
- conn = tp_connection_new (dbus, service_conn_as_base->bus_name,
- service_conn_as_base->object_path, &error);
- MYASSERT (conn != NULL, "");
- g_assert_no_error (error);
- tp_tests_proxy_run_until_prepared (conn, NULL);
-
- tp_tests_connection_assert_disconnect_succeeds (conn);
- g_object_unref (conn);
-
- service_conn_as_base = NULL;
- g_object_unref (service_conn);
- g_object_unref (dbus);
- g_main_loop_unref (mainloop);
-
- return 0;
-}
More information about the telepathy-commits
mailing list