Commit 14ed8b11 authored by Milan Crha's avatar Milan Crha

test-cal-client-get-revision could fail due to delayed D-Bus property change notification

The test had been mostly working, except cases when the delivery
of a D-Bus property change signal had been delayed. Then the value
on the client side was not the same as the value on the server side.
There's a very similar test for EBookClient, which does slightly more
things, which gives D-Bus enough time to deliver the property change
to the client, thus this change adds the component removal to address it.
parent 9d56af3e
......@@ -50,7 +50,7 @@ get_revision_compare_cycle (EBookClient *client)
g_assert (revision_before);
g_assert (revision_after);
g_assert (strcmp (revision_before, revision_after) != 0);
g_assert_cmpstr (revision_before, !=, revision_after);
g_message (
"Passed cycle, revision before '%s' revision after '%s'",
......
......@@ -42,18 +42,21 @@ get_revision_compare_cycle (ECalClient *client)
if (!e_client_get_backend_property_sync (E_CLIENT (client), CLIENT_BACKEND_PROPERTY_REVISION,
&revision_before, NULL, &error))
g_error ("Error getting book revision: %s", error->message);
g_error ("Error getting calendar revision: %s", error->message);
if (!e_cal_client_create_object_sync (client, icalcomp, &uid, NULL, &error))
g_error ("Error creating object: %s", error->message);
if (!e_cal_client_remove_object_sync (client, uid, NULL, E_CAL_OBJ_MOD_ALL, NULL, &error))
g_error ("Error removing created object: %s", error->message);
if (!e_client_get_backend_property_sync (E_CLIENT (client), CLIENT_BACKEND_PROPERTY_REVISION,
&revision_after, NULL, &error))
g_error ("Error getting book revision: %s", error->message);
g_error ("Error getting calendar revision: %s", error->message);
g_assert (revision_before);
g_assert (revision_after);
g_assert (strcmp (revision_before, revision_after) != 0);
g_assert_cmpstr (revision_before, !=, revision_after);
g_message (
"Passed cycle, revision before '%s' revision after '%s'",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment