[libgdata] youtube: Fix batch tests
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] youtube: Fix batch tests
- Date: Sat, 11 Dec 2010 18:33:04 +0000 (UTC)
commit bca50ab7f79f24fa5d4ba1269094e2e4daf811ab
Author: Philip Withnall <philip tecnocode co uk>
Date: Sat Dec 11 15:44:55 2010 +0000
youtube: Fix batch tests
Due to the fixes in GDataBatchOperation which ensure that callbacks are
always called for every operation, the batch operation tests need fixing.
gdata/tests/youtube.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdata/tests/youtube.c b/gdata/tests/youtube.c
index 1b20b27..81537c6 100644
--- a/gdata/tests/youtube.c
+++ b/gdata/tests/youtube.c
@@ -1194,11 +1194,12 @@ test_batch_async_cancellation (BatchData *data, gconstpointer service)
guint op_id;
GMainLoop *main_loop;
GCancellable *cancellable;
+ GError *error = NULL;
/* Run an async query operation on the video */
operation = gdata_batchable_create_operation (GDATA_BATCHABLE (service), "http://gdata.youtube.com/feeds/api/videos/batch");
op_id = gdata_test_batch_operation_query (operation, gdata_entry_get_id (data->new_video), GDATA_TYPE_YOUTUBE_VIDEO, data->new_video, NULL,
- NULL);
+ &error);
main_loop = g_main_loop_new (NULL, TRUE);
cancellable = g_cancellable_new ();
@@ -1207,6 +1208,10 @@ test_batch_async_cancellation (BatchData *data, gconstpointer service)
g_cancellable_cancel (cancellable); /* this should cancel the operation before it even starts, as we haven't run the main loop yet */
g_main_loop_run (main_loop);
+
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+ g_clear_error (&error);
+
g_main_loop_unref (main_loop);
g_object_unref (cancellable);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]