diff options
author | Jens Georg <mail@jensge.org> | 2022-03-12 15:58:29 +0100 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2022-03-12 15:58:29 +0100 |
commit | 24922d6a749f1ded7c41e4ad95424a4774c93442 (patch) | |
tree | e02487af56a42ef8c852cf4a19e294376f49c570 | |
parent | 4576207214ef0f2be4369b5c4c7088209795aa60 (diff) | |
download | gupnp-wip/ci.tar.gz |
test: Do not pollute global factorywip/ci
-rw-r--r-- | tests/test-bugs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/test-bugs.c b/tests/test-bugs.c index f2ab235..2bc67f5 100644 --- a/tests/test-bugs.c +++ b/tests/test-bugs.c @@ -315,7 +315,8 @@ test_bgo_678701 (void) g_assert_no_error (error); g_assert (context != NULL); - factory = gupnp_resource_factory_get_default (); + // Do not pollute the default factory with this test + factory = gupnp_resource_factory_new (); gupnp_resource_factory_register_resource_proxy_type (factory, "urn:test-gupnp-org:service:TestService:1", test_bgo_678701_service_get_type ()); @@ -328,8 +329,10 @@ test_bgo_678701 (void) g_assert (rd != NULL); gupnp_root_device_set_available (rd, TRUE); - cp = gupnp_control_point_new (context, - "urn:test-gupnp-org:device:TestDevice:1"); + cp = gupnp_control_point_new_full ( + context, + factory, + "urn:test-gupnp-org:device:TestDevice:1"); gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); g_signal_connect (G_OBJECT (cp), "device-proxy-available", @@ -353,7 +356,7 @@ test_bgo_678701 (void) g_object_unref (dev_info); g_object_unref (rd); g_object_unref (context); - + g_object_unref (factory); // Make sure the source teardown handlers get run so we don't confuse valgrind g_timeout_add (500, (GSourceFunc) delayed_loop_quitter, data.loop); |