Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package evolution-data-server for 
openSUSE:Factory checked in at 2021-07-21 19:05:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/evolution-data-server (Old)
 and      /work/SRC/openSUSE:Factory/.evolution-data-server.new.2632 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "evolution-data-server"

Wed Jul 21 19:05:56 2021 rev:225 rq:907045 version:3.40.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/evolution-data-server/evolution-data-server.changes  
    2021-06-09 21:51:47.306419809 +0200
+++ 
/work/SRC/openSUSE:Factory/.evolution-data-server.new.2632/evolution-data-server.changes
    2021-07-21 19:06:51.903342055 +0200
@@ -1,0 +2,10 @@
+Fri Jul  9 08:35:11 UTC 2021 - Bj??rn Lie <[email protected]>
+
+- Update to version 3.40.3:
+  + tests: Workaround libphonenumber behavior change.
+  + test-book-client-write-write: Fix occasional test failure.
+  + IMAPx: Change how Junk and NotJunk flags are handled.
+  + ECalBackendFile: Free interval tree only when being allocated.
+  + Bugs fixed: glgo#GNOME/evolution-data-server#336.
+
+-------------------------------------------------------------------

Old:
----
  evolution-data-server-3.40.2.tar.xz

New:
----
  evolution-data-server-3.40.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ evolution-data-server.spec ++++++
--- /var/tmp/diff_new_pack.Uv0HG7/_old  2021-07-21 19:06:52.383342888 +0200
+++ /var/tmp/diff_new_pack.Uv0HG7/_new  2021-07-21 19:06:52.387342895 +0200
@@ -31,7 +31,7 @@
 %bcond_without introspection
 
 Name:           evolution-data-server
-Version:        3.40.2
+Version:        3.40.3
 Release:        0
 Summary:        Evolution Data Server
 License:        LGPL-2.0-only

++++++ evolution-data-server-3.40.2.tar.xz -> 
evolution-data-server-3.40.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evolution-data-server-3.40.2/CMakeLists.txt 
new/evolution-data-server-3.40.3/CMakeLists.txt
--- old/evolution-data-server-3.40.2/CMakeLists.txt     2021-06-04 
08:36:39.000000000 +0200
+++ new/evolution-data-server-3.40.3/CMakeLists.txt     2021-07-09 
08:41:38.000000000 +0200
@@ -4,7 +4,7 @@
 cmake_policy(VERSION 3.1)
 
 project(evolution-data-server
-       VERSION 3.40.2
+       VERSION 3.40.3
        LANGUAGES C CXX)
 set(CMAKE_CXX_STANDARD 14)
 set(PROJECT_BUGREPORT 
"https://gitlab.gnome.org/GNOME/evolution-data-server/issues/";)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evolution-data-server-3.40.2/NEWS 
new/evolution-data-server-3.40.3/NEWS
--- old/evolution-data-server-3.40.2/NEWS       2021-06-04 08:36:39.000000000 
+0200
+++ new/evolution-data-server-3.40.3/NEWS       2021-07-09 08:41:38.000000000 
+0200
@@ -1,3 +1,15 @@
+Evolution-Data-Server 3.40.3 2021-07-09
+---------------------------------------
+
+Bug Fixes:
+       I#336 - Handle "Object is out of sync" during backend refresh better 
(Milan Crha)
+
+Miscellaneous:
+       tests: Workaround libphonenumber behavior change (Milan Crha)
+       test-book-client-write-write: Fix occasional test failure (Milan Crha)
+       IMAPx: Change how Junk and NotJunk flags are handled (Milan Crha)
+       ECalBackendFile: Free interval tree only when being allocated (Milan 
Crha)
+
 Evolution-Data-Server 3.40.2 2021-06-04
 ---------------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/src/addressbook/backends/carddav/e-book-backend-carddav.c
 
new/evolution-data-server-3.40.3/src/addressbook/backends/carddav/e-book-backend-carddav.c
--- 
old/evolution-data-server-3.40.2/src/addressbook/backends/carddav/e-book-backend-carddav.c
  2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/src/addressbook/backends/carddav/e-book-backend-carddav.c
  2021-07-09 08:41:38.000000000 +0200
@@ -1285,7 +1285,13 @@
 
        if (overwrite_existing && g_error_matches (local_error, 
SOUP_HTTP_ERROR, SOUP_STATUS_PRECONDITION_FAILED)) {
                g_clear_error (&local_error);
-               local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
+
+               /* Pretend success when using the serer version on conflict,
+                  the component will be updated during the refresh */
+               if (conflict_resolution == E_CONFLICT_RESOLUTION_KEEP_SERVER)
+                       success = TRUE;
+               else
+                       local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
        }
 
        if (local_error) {
@@ -1374,7 +1380,13 @@
                success = TRUE;
        } else if (g_error_matches (local_error, SOUP_HTTP_ERROR, 
SOUP_STATUS_PRECONDITION_FAILED)) {
                g_clear_error (&local_error);
-               local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
+
+               /* Pretend success when using the serer version on conflict,
+                  the component will be updated during the refresh */
+               if (conflict_resolution == E_CONFLICT_RESOLUTION_KEEP_SERVER)
+                       success = TRUE;
+               else
+                       local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
        }
 
        if (local_error) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/src/addressbook/libedata-book/e-book-meta-backend.c
 
new/evolution-data-server-3.40.3/src/addressbook/libedata-book/e-book-meta-backend.c
--- 
old/evolution-data-server-3.40.2/src/addressbook/libedata-book/e-book-meta-backend.c
        2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/src/addressbook/libedata-book/e-book-meta-backend.c
        2021-07-09 08:41:38.000000000 +0200
@@ -813,7 +813,7 @@
        } else {
                GError *local_error = NULL;
 
-               success = ebmb_upload_local_changes_sync (meta_backend, 
book_cache, E_CONFLICT_RESOLUTION_FAIL, cancellable, &local_error);
+               success = ebmb_upload_local_changes_sync (meta_backend, 
book_cache, E_CONFLICT_RESOLUTION_KEEP_SERVER, cancellable, &local_error);
 
                if (local_error) {
                        if (g_error_matches (local_error, G_IO_ERROR, 
G_IO_ERROR_HOST_NOT_FOUND))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/src/calendar/backends/caldav/e-cal-backend-caldav.c
 
new/evolution-data-server-3.40.3/src/calendar/backends/caldav/e-cal-backend-caldav.c
--- 
old/evolution-data-server-3.40.2/src/calendar/backends/caldav/e-cal-backend-caldav.c
        2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/src/calendar/backends/caldav/e-cal-backend-caldav.c
        2021-07-09 08:41:38.000000000 +0200
@@ -1524,7 +1524,13 @@
 
        if (overwrite_existing && g_error_matches (local_error, 
SOUP_HTTP_ERROR, SOUP_STATUS_PRECONDITION_FAILED)) {
                g_clear_error (&local_error);
-               local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
+
+               /* Pretend success when using the serer version on conflict,
+                  the component will be updated during the refresh */
+               if (conflict_resolution == E_CONFLICT_RESOLUTION_KEEP_SERVER)
+                       success = TRUE;
+               else
+                       local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
        }
 
        if (local_error) {
@@ -1613,7 +1619,13 @@
                success = TRUE;
        } else if (g_error_matches (local_error, SOUP_HTTP_ERROR, 
SOUP_STATUS_PRECONDITION_FAILED)) {
                g_clear_error (&local_error);
-               local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
+
+               /* Pretend success when using the serer version on conflict,
+                  the component will be updated during the refresh */
+               if (conflict_resolution == E_CONFLICT_RESOLUTION_KEEP_SERVER)
+                       success = TRUE;
+               else
+                       local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
        }
 
        if (local_error) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/src/calendar/backends/file/e-cal-backend-file.c
 
new/evolution-data-server-3.40.3/src/calendar/backends/file/e-cal-backend-file.c
--- 
old/evolution-data-server-3.40.2/src/calendar/backends/file/e-cal-backend-file.c
    2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/src/calendar/backends/file/e-cal-backend-file.c
    2021-07-09 08:41:38.000000000 +0200
@@ -298,7 +298,8 @@
 
        g_rec_mutex_lock (&priv->idle_save_rmutex);
 
-       e_intervaltree_destroy (priv->interval_tree);
+       if (priv->interval_tree)
+               e_intervaltree_destroy (priv->interval_tree);
        priv->interval_tree = NULL;
 
        free_calendar_components (priv->comp_uid_hash, priv->vcalendar);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/src/calendar/backends/webdav-notes/e-cal-backend-webdav-notes.c
 
new/evolution-data-server-3.40.3/src/calendar/backends/webdav-notes/e-cal-backend-webdav-notes.c
--- 
old/evolution-data-server-3.40.2/src/calendar/backends/webdav-notes/e-cal-backend-webdav-notes.c
    2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/src/calendar/backends/webdav-notes/e-cal-backend-webdav-notes.c
    2021-07-09 08:41:38.000000000 +0200
@@ -1172,7 +1172,13 @@
 
        if (overwrite_existing && g_error_matches (local_error, 
SOUP_HTTP_ERROR, SOUP_STATUS_PRECONDITION_FAILED)) {
                g_clear_error (&local_error);
-               local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
+
+               /* Pretend success when using the serer version on conflict,
+                  the component will be updated during the refresh */
+               if (conflict_resolution == E_CONFLICT_RESOLUTION_KEEP_SERVER)
+                       success = TRUE;
+               else
+                       local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
        }
 
        if (local_error) {
@@ -1237,7 +1243,13 @@
                success = TRUE;
        } else if (g_error_matches (local_error, SOUP_HTTP_ERROR, 
SOUP_STATUS_PRECONDITION_FAILED)) {
                g_clear_error (&local_error);
-               local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
+
+               /* Pretend success when using the serer version on conflict,
+                  the component will be updated during the refresh */
+               if (conflict_resolution == E_CONFLICT_RESOLUTION_KEEP_SERVER)
+                       success = TRUE;
+               else
+                       local_error = EC_ERROR (E_CLIENT_ERROR_OUT_OF_SYNC);
        }
 
        if (local_error) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/src/calendar/libedata-cal/e-cal-meta-backend.c 
new/evolution-data-server-3.40.3/src/calendar/libedata-cal/e-cal-meta-backend.c
--- 
old/evolution-data-server-3.40.2/src/calendar/libedata-cal/e-cal-meta-backend.c 
    2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/src/calendar/libedata-cal/e-cal-meta-backend.c 
    2021-07-09 08:41:38.000000000 +0200
@@ -714,7 +714,7 @@
        } else {
                GError *local_error = NULL;
 
-               success = ecmb_upload_local_changes_sync (meta_backend, 
cal_cache, E_CONFLICT_RESOLUTION_FAIL, cancellable, &local_error);
+               success = ecmb_upload_local_changes_sync (meta_backend, 
cal_cache, E_CONFLICT_RESOLUTION_KEEP_SERVER, cancellable, &local_error);
                if (local_error) {
                        if (g_error_matches (local_error, G_IO_ERROR, 
G_IO_ERROR_HOST_NOT_FOUND))
                                e_backend_set_online (E_BACKEND (meta_backend), 
FALSE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/src/camel/providers/imapx/camel-imapx-server.c 
new/evolution-data-server-3.40.3/src/camel/providers/imapx/camel-imapx-server.c
--- 
old/evolution-data-server-3.40.2/src/camel/providers/imapx/camel-imapx-server.c 
    2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/src/camel/providers/imapx/camel-imapx-server.c 
    2021-07-09 08:41:38.000000000 +0200
@@ -4903,8 +4903,14 @@
 
                                                if (remove_deleted_flags)
                                                        
camel_message_info_set_flags (destination_info, CAMEL_MESSAGE_DELETED, 0);
-                                               if (remove_junk_flags)
+                                               if (remove_junk_flags) {
                                                        
camel_message_info_set_flags (destination_info, CAMEL_MESSAGE_JUNK, 0);
+
+                                                       /* Force unset of the 
flag at the destination */
+                                                       
camel_imapx_message_info_set_server_flags (CAMEL_IMAPX_MESSAGE_INFO 
(destination_info),
+                                                               
camel_imapx_message_info_get_server_flags (CAMEL_IMAPX_MESSAGE_INFO 
(destination_info)) | CAMEL_MESSAGE_JUNK);
+                                                       
camel_message_info_set_folder_flagged (destination_info, TRUE);
+                                               }
                                                imapx_copy_move_message_cache 
(folder, destination_folder, delete_originals || use_move_command,
                                                        
camel_message_info_get_uid (source_info),
                                                        
camel_message_info_get_uid (destination_info),
@@ -5955,9 +5961,12 @@
                        gboolean move_to_real_trash;
                        gboolean move_to_inbox;
 
+                       /* Some servers can leave the Junk flag even it had 
been unset, thus check also the NotJunk flag
+                          to avoid move back to the Junk folder. */
                        move_to_real_junk =
                                use_real_junk_path &&
-                               (flags & CAMEL_MESSAGE_JUNK);
+                               (flags & CAMEL_MESSAGE_JUNK) &&
+                               (camel_message_info_get_flags (info) & 
CAMEL_MESSAGE_NOTJUNK) == 0;
 
                        move_to_real_trash =
                                use_real_trash_path && remove_deleted_flags &&
@@ -6364,7 +6373,7 @@
                            !(has_flags & CAMEL_MESSAGE_DELETED)) {
                                set_folder_flagged = FALSE;
                        } else {
-                               /* to stare back the \Deleted flag */
+                               /* to store back the \Deleted flag */
                                set_server_flags &= ~CAMEL_MESSAGE_DELETED;
                                set_folder_flagged = TRUE;
                        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/src/camel/providers/imapx/camel-imapx-utils.c 
new/evolution-data-server-3.40.3/src/camel/providers/imapx/camel-imapx-utils.c
--- 
old/evolution-data-server-3.40.2/src/camel/providers/imapx/camel-imapx-utils.c  
    2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/src/camel/providers/imapx/camel-imapx-utils.c  
    2021-07-09 08:41:38.000000000 +0200
@@ -365,6 +365,12 @@
        if ((permanent_flags & CAMEL_MESSAGE_USER) != 0 && 
imapx_update_user_flags (info, server_user_flags))
                changed = TRUE;
 
+       /* When both Junk and NotJunk are set, pretend the Junk flag is not set 
(this can happen when
+          the server fails to unset the Junk flag on message copy/move). */
+       if ((server_flags & CAMEL_MESSAGE_JUNK) != 0 && (server_flags & 
CAMEL_MESSAGE_NOTJUNK) != 0) {
+               changed = camel_message_info_set_flags (info, 
CAMEL_MESSAGE_JUNK, 0) || changed;
+       }
+
        return changed;
 }
 
@@ -386,6 +392,14 @@
 
        camel_message_info_take_user_tags (info, camel_name_value_array_copy 
(user_tags));
 
+       /* When the server has set both flags it means the user marked the 
message as not being junk;
+          in that case pretend the server has the Junk flag off, otherwise the 
message won't be
+          shown in its destination folder. */
+       if ((server_flags & CAMEL_MESSAGE_JUNK) != 0 &&
+           (server_flags & CAMEL_MESSAGE_NOTJUNK) != 0) {
+               camel_message_info_set_flags (info, CAMEL_MESSAGE_JUNK, 0);
+       }
+
        camel_message_info_set_folder_flagged (info, FALSE);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/tests/libebook/client/test-book-client-write-write.c
 
new/evolution-data-server-3.40.3/tests/libebook/client/test-book-client-write-write.c
--- 
old/evolution-data-server-3.40.2/tests/libebook/client/test-book-client-write-write.c
       2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/tests/libebook/client/test-book-client-write-write.c
       2021-07-09 08:41:38.000000000 +0200
@@ -45,14 +45,14 @@
 } TestData;
 
 typedef struct {
-       ESourceRegistry *registry;
+       ETestServerFixture *fixture;
        GThread       *thread;
        const gchar   *book_uid;
        const gchar   *contact_uid;
        EContactField  field;
        const gchar   *value;
        EBookClient   *client;
-       GMainLoop     *loop;
+       EFlag         *flag;
 } ThreadData;
 
 /* Special attention needed for this array:
@@ -114,7 +114,7 @@
        if (retry)
                try_write_field_thread_idle (data);
        else
-               g_main_loop_quit (data->loop);
+               e_flag_set (data->flag);
 }
 
 static void
@@ -154,9 +154,7 @@
                                  GAsyncResult *res,
                                  ThreadData *data)
 {
-       GMainContext *context;
-       GSource      *gsource;
-       GError       *error = NULL;
+       GError *error = NULL;
 
        if (!e_client_open_finish (E_CLIENT (source_object), res, &error))
                g_error (
@@ -164,10 +162,7 @@
                        e_contact_field_name (data->field),
                        error->message);
 
-       context = g_main_loop_get_context (data->loop);
-       gsource = g_idle_source_new ();
-       g_source_set_callback (gsource, (GSourceFunc) 
try_write_field_thread_idle, data, NULL);
-       g_source_attach (gsource, context);
+       g_idle_add ((GSourceFunc) try_write_field_thread_idle, data);
 }
 
 static gboolean
@@ -182,17 +177,11 @@
 static gpointer
 test_write_thread (ThreadData *data)
 {
-       GMainContext    *context;
-       GSource         *gsource;
-       ESource         *source;
-       GError          *error = NULL;
-
-       context = g_main_context_new ();
-       data->loop = g_main_loop_new (context, FALSE);
-       g_main_context_push_thread_default (context);
+       ESource *source;
+       GError *error = NULL;
 
        /* Open the test book client in this thread */
-       source = e_source_registry_ref_source (data->registry, data->book_uid);
+       source = e_source_registry_ref_source (data->fixture->registry, 
data->book_uid);
        if (!source)
                g_error ("Unable to fetch source uid '%s' from the registry", 
data->book_uid);
 
@@ -202,23 +191,18 @@
 
        /* Retry setting the contact field until we succeed setting the field
         */
-       gsource = g_idle_source_new ();
-       g_source_set_callback (gsource, (GSourceFunc) 
test_write_thread_open_idle, data, NULL);
-       g_source_attach (gsource, context);
-       g_main_loop_run (data->loop);
+       g_idle_add ((GSourceFunc) test_write_thread_open_idle, data);
 
-       g_object_unref (source);
+       e_flag_wait (data->flag);
 
+       g_object_unref (source);
        g_object_unref (data->client);
-       g_main_context_pop_thread_default (context);
-       g_main_loop_unref (data->loop);
-       g_main_context_unref (context);
 
        return NULL;
 }
 
 static ThreadData *
-create_test_thread (ESourceRegistry *registry,
+create_test_thread (ETestServerFixture *fixture,
                    const gchar *book_uid,
                     const gchar *contact_uid,
                     EContactField field,
@@ -227,13 +211,14 @@
        ThreadData  *data = g_slice_new0 (ThreadData);
        const gchar *name = e_contact_field_name (field);
 
-       g_assert_nonnull (registry);
+       g_assert_nonnull (fixture);
 
-       data->registry = registry;
+       data->fixture = fixture;
        data->book_uid = book_uid;
        data->contact_uid = contact_uid;
        data->field = field;
        data->value = value;
+       data->flag = e_flag_new ();
 
        data->thread = g_thread_new (name, (GThreadFunc) test_write_thread, 
data);
 
@@ -244,12 +229,34 @@
 wait_thread_test (ThreadData *data)
 {
        g_thread_join (data->thread);
+       e_flag_free (data->flag);
        g_slice_free (ThreadData, data);
 }
 
+typedef struct _WaitForThreadsData {
+       ETestServerFixture *fixture;
+       ThreadData **tests;
+       guint n_tests;
+} WaitForThreadsData;
+
+static gpointer
+wait_for_tests_thread (gpointer user_data)
+{
+       WaitForThreadsData *data = user_data;
+       gint ii;
+
+       /* Wait for all threads to complete */
+       for (ii = 0; ii < data->n_tests; ii++)
+               wait_thread_test (data->tests[ii]);
+
+       g_main_loop_quit (data->fixture->loop);
+
+       return NULL;
+}
+
 static void
 test_concurrent_writes (ETestServerFixture *fixture,
-                       gconstpointer user_data)
+                       gconstpointer user_data)
 {
        EBookClient *main_client;
        ESource *source;
@@ -257,6 +264,8 @@
        GError *error = NULL;
        const gchar *book_uid = NULL;
        gchar *contact_uid = NULL;
+       WaitForThreadsData wait_data;
+       GThread *wait_thread;
        ThreadData **tests;
        gint i;
 
@@ -275,14 +284,19 @@
        tests = g_new0 (ThreadData *, G_N_ELEMENTS (field_tests));
        for (i = 0; i < G_N_ELEMENTS (field_tests); i++)
                tests[i] = create_test_thread (
-                       fixture->registry,
+                       fixture,
                        book_uid, contact_uid,
                        field_tests[i].field,
                        field_tests[i].value);
 
-       /* Wait for all threads to complete */
-       for (i = 0; i < G_N_ELEMENTS (field_tests); i++)
-               wait_thread_test (tests[i]);
+       wait_data.fixture = fixture;
+       wait_data.tests = tests;
+       wait_data.n_tests = G_N_ELEMENTS (field_tests);
+
+       wait_thread = g_thread_new ("wait-tests", wait_for_tests_thread, 
&wait_data);
+       g_thread_unref (wait_thread);
+
+       g_main_loop_run (fixture->loop);
 
        /* Fetch the updated contact */
        if (!e_book_client_get_contact_sync (main_client, contact_uid, 
&contact, NULL, &error))
@@ -312,6 +326,7 @@
        g_object_unref (contact);
 
        g_free (contact_uid);
+       g_free (tests);
 }
 
 gint
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/tests/libedata-book/data-test-utils.c 
new/evolution-data-server-3.40.3/tests/libedata-book/data-test-utils.c
--- old/evolution-data-server-3.40.2/tests/libedata-book/data-test-utils.c      
2021-06-04 08:36:39.000000000 +0200
+++ new/evolution-data-server-3.40.3/tests/libedata-book/data-test-utils.c      
2021-07-09 08:41:38.000000000 +0200
@@ -645,6 +645,7 @@
                         * contact changes only happen because of e164 number 
interpretations.
                         */
                        if (e_phone_number_is_supported () &&
+                           assertion->count != -1 &&
                            assertion->count != n_locale_changes)
                                g_error (
                                        "Expected %d e164 numbers to change, %d 
actually changed.",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/tests/libedata-book/test-book-cache-cursor-change-locale.c
 
new/evolution-data-server-3.40.3/tests/libedata-book/test-book-cache-cursor-change-locale.c
--- 
old/evolution-data-server-3.40.2/tests/libedata-book/test-book-cache-cursor-change-locale.c
 2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/tests/libedata-book/test-book-cache-cursor-change-locale.c
 2021-07-09 08:41:38.000000000 +0200
@@ -84,7 +84,7 @@
                tcu_step_test_add_assertion (data, 5, 17, 16, 18, 10, 14);
                tcu_step_test_add_assertion (data, 5, 13, 12, 9,  19, 20);
 
-               /* When changing from fr_CA to de_DE, two numbers change:
+               /* Depending on the libphonenumber, when changing from fr_CA to 
de_DE, two numbers change:
                 *
                 * sorted-5:
                 *    049-2459-4393 is now parsed with the national number as 
4924594393
@@ -92,8 +92,9 @@
                 * sorted-4:
                 *    12 245999 is now parsed with national number 12245999 
instead of 2245999
                 *
+                * or only one. Skip this check, because a lack of a way to get 
the libphonenumber version.
                 */
-               tcu_step_test_change_locale (data, "de_DE.UTF-8", 2);
+               tcu_step_test_change_locale (data, "de_DE.UTF-8", -1);
                tcu_step_test_add_assertion (data, 5, 11, 1,  2,  5,  6);
                tcu_step_test_add_assertion (data, 5, 7,  8,  4,  3,  15);
                tcu_step_test_add_assertion (data, 5, 17, 16, 18, 10, 14);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/tests/libedata-book/test-book-cache-utils.c 
new/evolution-data-server-3.40.3/tests/libedata-book/test-book-cache-utils.c
--- 
old/evolution-data-server-3.40.2/tests/libedata-book/test-book-cache-utils.c    
    2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/tests/libedata-book/test-book-cache-utils.c    
    2021-07-09 08:41:38.000000000 +0200
@@ -579,6 +579,7 @@
                         * contact changes only happen because of e164 number 
interpretations.
                         */
                        if (e_phone_number_is_supported () &&
+                           assertion->count != -1 &&
                            assertion->count != n_locale_changes)
                                g_error ("Expected %d e164 numbers to change, 
%d actually changed.",
                                        assertion->count, n_locale_changes);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.40.2/tests/libedata-book/test-sqlite-cursor-change-locale.c
 
new/evolution-data-server-3.40.3/tests/libedata-book/test-sqlite-cursor-change-locale.c
--- 
old/evolution-data-server-3.40.2/tests/libedata-book/test-sqlite-cursor-change-locale.c
     2021-06-04 08:36:39.000000000 +0200
+++ 
new/evolution-data-server-3.40.3/tests/libedata-book/test-sqlite-cursor-change-locale.c
     2021-07-09 08:41:38.000000000 +0200
@@ -87,7 +87,7 @@
                step_test_add_assertion (data, 5, 17, 16, 18, 10, 14);
                step_test_add_assertion (data, 5, 13, 12, 9,  19, 20);
 
-               /* When changing from fr_CA to de_DE, two numbers change:
+               /* Depending on the libphonenumber, when changing from fr_CA to 
de_DE, two numbers change:
                 *
                 * sorted-5:
                 *    049-2459-4393 is now parsed with the national number as 
4924594393
@@ -95,8 +95,9 @@
                 * sorted-4:
                 *    12 245999 is now parsed with national number 12245999 
instead of 2245999
                 *
+                * or only one. Skip this check, because a lack of a way to get 
the libphonenumber version.
                 */
-               step_test_change_locale (data, "de_DE.UTF-8", 2);
+               step_test_change_locale (data, "de_DE.UTF-8", -1);
                step_test_add_assertion (data, 5, 11, 1,  2,  5,  6);
                step_test_add_assertion (data, 5, 7,  8,  4,  3,  15);
                step_test_add_assertion (data, 5, 17, 16, 18, 10, 14);

Reply via email to