tests: Take explicit connection and context when ensuring testserver up

This introduces no functional changes, but makes the code a little more
explicit about which connection and main context it’s operating on.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1515
This commit is contained in:
Philip Withnall
2020-02-20 11:49:12 +00:00
parent 1a51681e6d
commit b2e543f6a4
4 changed files with 20 additions and 19 deletions

View File

@@ -124,14 +124,14 @@ main (int argc,
g_assert (g_spawn_command_line_async (path, NULL));
g_free (path);
ensure_gdbus_testserver_up ();
/* Create the connection in the main thread */
error = NULL;
c = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
g_assert_no_error (error);
g_assert (c != NULL);
ensure_gdbus_testserver_up (c, NULL);
g_test_add_func ("/gdbus/connection-loss", test_connection_loss);
ret = g_test_run();