[evolution-data-server] ECalClient view tests, fixed ref counting.



commit 19adcad86a8cffe8c4d6ec9fc1df997d86907e5f
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Sat Mar 16 20:07:31 2013 +0900

    ECalClient view tests, fixed ref counting.
    
    Needed to unref the views in async tests on calendar views,
    not releasing the views cause the client to fail to finalize.

 tests/libecal/client/test-client-get-view.c      |    3 +++
 tests/libecal/client/test-client-revision-view.c |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tests/libecal/client/test-client-get-view.c b/tests/libecal/client/test-client-get-view.c
index d2790e7..03aa93c 100644
--- a/tests/libecal/client/test-client-get-view.c
+++ b/tests/libecal/client/test-client-get-view.c
@@ -168,6 +168,9 @@ test_get_view_async (ETestServerFixture *fixture,
 
        e_cal_client_get_view (cal_client, "(contains? \"any\" \"event\")", NULL, async_get_view_ready, 
fixture->loop);
        g_main_loop_run (fixture->loop);
+
+       /* Will unref the view */
+       g_object_set_data (G_OBJECT (cal_client), "cal-view", NULL);
 }
 
 static void
diff --git a/tests/libecal/client/test-client-revision-view.c 
b/tests/libecal/client/test-client-revision-view.c
index 6ebe717..ea2a5de 100644
--- a/tests/libecal/client/test-client-revision-view.c
+++ b/tests/libecal/client/test-client-revision-view.c
@@ -211,6 +211,9 @@ test_get_revision_view_async (ETestServerFixture *fixture,
 
        e_cal_client_get_view (cal_client, "(contains? \"any\" \"event\")", NULL, async_get_view_ready, 
fixture->loop);
        g_main_loop_run (fixture->loop);
+
+       /* Will unref the view */
+       g_object_set_data (G_OBJECT (cal_client), "cal-view", NULL);
 }
 
 static void


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