summary refs log tree commit diff
path: root/libnm/tests/test-remote-settings-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm/tests/test-remote-settings-client.c')
-rw-r--r--libnm/tests/test-remote-settings-client.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/libnm/tests/test-remote-settings-client.c b/libnm/tests/test-remote-settings-client.c
index 8f59656d..f6c37e91 100644
--- a/libnm/tests/test-remote-settings-client.c
+++ b/libnm/tests/test-remote-settings-client.c
@@ -31,7 +31,7 @@ static NMClient *client = NULL;
 GDBusConnection *bus = NULL;
 NMRemoteConnection *remote = NULL;
 
-/*******************************************************************/
+/*****************************************************************************/
 
 static void
 add_cb (GObject *s,
@@ -87,7 +87,7 @@ test_add_connection (void)
 	g_object_unref (connection);
 }
 
-/*******************************************************************/
+/*****************************************************************************/
 
 static void
 set_visible_cb (GObject *proxy,
@@ -194,7 +194,7 @@ test_make_invisible (void)
 	g_object_unref (proxy);
 }
 
-/*******************************************************************/
+/*****************************************************************************/
 
 static void
 vis_new_connection_cb (NMClient *foo,
@@ -271,7 +271,7 @@ test_make_visible (void)
 	g_object_unref (proxy);
 }
 
-/*******************************************************************/
+/*****************************************************************************/
 
 static void
 deleted_cb (GObject *proxy,
@@ -336,9 +336,10 @@ test_remove_connection (void)
 	do {
 		now = time (NULL);
 		g_main_context_iteration (NULL, FALSE);
-	} while ((done == FALSE) && (now - start < 5));
+		if (done && !remote)
+			break;
+	} while (now - start < 5);
 	g_assert (done == TRUE);
-
 	g_assert (!remote);
 
 	/* Ensure NMClient no longer has the connection */
@@ -354,7 +355,7 @@ test_remove_connection (void)
 	g_object_unref (proxy);
 }
 
-/*******************************************************************/
+/*****************************************************************************/
 
 #define TEST_ADD_REMOVE_ID "add-remove-test-connection"
 
@@ -413,7 +414,7 @@ test_add_remove_connection (void)
 	g_object_unref (connection);
 }
 
-/*******************************************************************/
+/*****************************************************************************/
 
 static void
 add_bad_cb (GObject *s,
@@ -456,7 +457,7 @@ test_add_bad_connection (void)
 	g_assert (remote == NULL);
 }
 
-/*******************************************************************/
+/*****************************************************************************/
 
 static void
 save_hostname_cb (GObject *s,
@@ -495,7 +496,7 @@ test_save_hostname (void)
 	g_assert (remote == NULL);
 }
 
-/*******************************************************************/
+/*****************************************************************************/
 
 NMTST_DEFINE ();