Author: fmeschbe
Date: Wed Jul  4 08:33:51 2012
New Revision: 1357169

URL: http://svn.apache.org/viewvc?rev=1357169&view=rev
Log:
Make sure to really wait until being notified. The thread might be awakened (or 
interrupted) for other reasons than for triggering by notification so we loop 
until we get the notification. To also not loose a notification, we wait for a 
limited time only. In any case, the loop only exists when the trigger flag is 
set.

Modified:
    
felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/TestThread.java

Modified: 
felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/TestThread.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/TestThread.java?rev=1357169&r1=1357168&r2=1357169&view=diff
==============================================================================
--- 
felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/TestThread.java
 (original)
+++ 
felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/TestThread.java
 Wed Jul  4 08:33:51 2012
@@ -40,15 +40,15 @@ abstract class TestThread extends Thread
     {
         synchronized ( flag )
         {
-            if ( !notified )
+            while ( !notified )
             {
                 try
                 {
-                    flag.wait();
+                    flag.wait( 500L );
                 }
                 catch ( InterruptedException ie )
                 {
-                    // TODO: log
+                    // ignore
                 }
             }
         }


Reply via email to