use IndividualAggregator.dup () in tests and tools
[platform/upstream/folks.git] / tests / tracker / url-details-interface.vala
index 1487694..3cba442 100644 (file)
@@ -62,13 +62,7 @@ public class UrlDetailsInterfaceTests : TrackerTest.TestCase
 
       this._test_url_details_interface_async.begin ();
 
-      Timeout.add_seconds (5, () =>
-        {
-          this._main_loop.quit ();
-          assert_not_reached ();
-        });
-
-      this._main_loop.run ();
+      TestUtils.loop_run_with_timeout (this._main_loop);
 
       assert (this._found_blog == true);
       assert (this._found_website == true);
@@ -78,7 +72,7 @@ public class UrlDetailsInterfaceTests : TrackerTest.TestCase
     {
       var store = BackendStore.dup ();
       yield store.prepare ();
-      this._aggregator = new IndividualAggregator ();
+      this._aggregator = IndividualAggregator.dup ();
       this._aggregator.individuals_changed_detailed.connect
           (this._individuals_changed_cb);
       try
@@ -135,10 +129,10 @@ public int main (string[] args)
 {
   Test.init (ref args);
 
-  TestSuite root = TestSuite.get_root ();
-  root.add_suite (new UrlDetailsInterfaceTests ().get_suite ());
-
+  var tests = new UrlDetailsInterfaceTests ();
+  tests.register ();
   Test.run ();
+  tests.final_tear_down ();
 
   return 0;
 }