=?utf-8?q?=5Bfolks/folks-0-6=5D_eds=3A_Add_an_extra_timeout_to_the_EDS_te?= =?utf-8?q?sts_to_ensure_the_main_loop=E2=80=99s_empty?=



commit ef9accf8b57b94840c7a2216c2dcccc6bf0a29e8
Author: Philip Withnall <philip tecnocode co uk>
Date:   Mon Apr 16 15:39:37 2012 +0100

    eds: Add an extra timeout to the EDS tests to ensure the main loopâs empty
    
    This is a horrible hack for which I should probably be shot. I just want to
    make the release. Please donât judge me.
    
    The tests all need to be rearchitected to no longer rely on timers everywhere
    anyway.

 tests/eds/link-personas.vala |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/tests/eds/link-personas.vala b/tests/eds/link-personas.vala
index 09c5e31..745de8a 100644
--- a/tests/eds/link-personas.vala
+++ b/tests/eds/link-personas.vala
@@ -135,7 +135,12 @@ public class LinkPersonasTests : Folks.TestCase
 
       var timer_id = Timeout.add_seconds (8, () =>
         {
-          this._main_loop.quit ();
+          // Let the main loop run out of events before we quit (yes, this is a HACK)
+          Timeout.add_seconds (5, () =>
+            {
+              this._main_loop.quit ();
+              return false;
+            });
           assert_not_reached ();
         });
 
@@ -432,7 +437,11 @@ public class LinkPersonasTests : Folks.TestCase
 
           if (this._linking_props.size == 0)
             {
-              this._main_loop.quit ();
+              Timeout.add_seconds (5, () =>
+                {
+                  this._main_loop.quit ();
+                  return false;
+                });
             }
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]