Index: /tests/SystemQueue-tests.cc
===================================================================
--- /tests/SystemQueue-tests.cc	(revision 12749)
+++ /tests/SystemQueue-tests.cc	(revision 12750)
@@ -1,4 +1,6 @@
 #include "gtest/gtest.h"
 #include "ariba/utility/system/SystemQueue.h"
+
+#include <unistd.h>  // usleep
 
 #include <ostream>
@@ -87,4 +89,7 @@
 TEST_F(SystemQueueTest, ScheduleCall)
 {
+    #define MAX_WAIT 100  // microseconds
+    #define SLEEP_TIME 10  // microseconds
+
     SystemQueue& sysq = SystemQueue::instance();
     checkmark = false;  // just to be sure..
@@ -97,16 +102,19 @@
         boost::bind(&SystemQueueTest::Check, this)
     );
-
-    // FIXME: yes, we have to wait a while here...
-    //   maybe write a function (in the fixture): wait_for_remaining_events(int max_millisecs)
+    
+    // wait for the event to happen, (but not too long!)
+    for ( int i = 0; i < MAX_WAIT / SLEEP_TIME; i++)
+    {
+        if ( checkmark )
+            break;
+        
+        cout << "/// sleeping for " << SLEEP_TIME << " microseconds ..." << endl;
+        usleep(SLEEP_TIME);
+    }
     
     // stop
     sysq.cancel();
     
-    EXPECT_TRUE( checkmark );
-    
-    /* NOTE: If this fails, maybe we'll have to wait a bit..?
-     *   There should be a possibility to cancel the SystemQueue as soon as it's empty..
-     */
+    EXPECT_TRUE( checkmark ) << "Function was called within " << MAX_WAIT << " microseconds.";    
 }
 
