[libgdata] tests: Fix DS problems with the Google Document removal tests
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] tests: Fix DS problems with the Google Document removal tests
- Date: Fri, 2 Aug 2013 10:11:35 +0000 (UTC)
commit 0e6e38604c23959e510eb21385a803f61587443c
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Aug 1 09:16:08 2013 +0200
tests: Fix DS problems with the Google Document removal tests
gdata/tests/documents.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gdata/tests/documents.c b/gdata/tests/documents.c
index 98da9b0..e3c7b54 100644
--- a/gdata/tests/documents.c
+++ b/gdata/tests/documents.c
@@ -1240,6 +1240,7 @@ G_STMT_START {
} G_STMT_END,
G_STMT_START {
GDataDocumentsEntry *entry;
+ GDataEntry *new_entry;
entry = gdata_documents_service_remove_entry_from_folder_finish (GDATA_DOCUMENTS_SERVICE (obj),
async_result, &error);
@@ -1254,6 +1255,17 @@ G_STMT_START {
} else {
g_assert (entry == NULL);
}
+
+ /* With the longer cancellation timeouts, the server can somehow modify the document without getting
around to completely
+ * deleting it; hence its ETag changes, but it isn't marked as deleted. Joy of joys. Re-query for the
document after every
+ * attempt to ensure we've always got the latest ETag value. */
+ new_entry = gdata_service_query_single_entry (GDATA_SERVICE (obj),
gdata_documents_service_get_primary_authorization_domain (),
+ gdata_entry_get_id (GDATA_ENTRY (data->document)), NULL,
+ G_OBJECT_TYPE (data->document), NULL, NULL);
+ g_assert (GDATA_IS_DOCUMENTS_ENTRY (new_entry));
+
+ g_object_unref (data->document);
+ data->document = new_entry;
} G_STMT_END);
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]