[libgdata] contacts: Sleep for 3s after uploading a photo in the tests



commit be230783f8a4105e1a128873b4666060f164e856
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Jul 5 21:45:27 2012 +0100

    contacts: Sleep for 3s after uploading a photo in the tests
    
    It now seems to fairly consistently take Google servers 3s to process
    uploaded photos. Before this time has passed, a query for an uploaded photo
    (using the URI provided in the âupload successfulâ response) will result in
    an error.
    
    Helps: https://bugzilla.gnome.org/show_bug.cgi?id=679072

 gdata/tests/contacts.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gdata/tests/contacts.c b/gdata/tests/contacts.c
index 390c3db..710851c 100644
--- a/gdata/tests/contacts.c
+++ b/gdata/tests/contacts.c
@@ -1958,6 +1958,11 @@ add_photo_to_contact (GDataContactsService *service, GDataContactsContact *conta
 	g_assert (gdata_contacts_contact_set_photo (contact, service, photo_data, length, "image/jpeg", NULL, NULL) == TRUE);
 
 	g_free (photo_data);
+
+	/* HACK: It fairly consistently seems to take the Google servers about 3 seconds to process uploaded photos. Before this
+	 * time, a query for the photo will return an error.
+	 * Helps: bgo#679072 */
+	sleep (3);
 }
 
 typedef TempContactData TempContactWithPhotoData;



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