You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2010/10/19 13:51:31 UTC

svn commit: r1024209 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java

Author: seelmann
Date: Tue Oct 19 11:51:31 2010
New Revision: 1024209

URL: http://svn.apache.org/viewvc?rev=1024209&view=rev
Log:
Interim fix

Modified:
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=1024209&r1=1024208&r2=1024209&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java Tue Oct 19 11:51:31 2010
@@ -1183,6 +1183,14 @@ public class AddIT extends AbstractLdapT
         catch ( Exception e )
         {
             // We are expecting the session to be close here.
+            if ( connection.isConnected() )
+            {
+                // Race condition:
+                // Upon NoticeOfDisconnection the API sends an abandon request but does not immediately close the connection.
+                // So at this point it is not guaranteed that the connnection is already closed.
+                // TODO: This is just a workaround, better check the connection for any outstanding abandon requests
+                Thread.sleep( 1000 );
+            }
             assertFalse( connection.isConnected() );
         }
     }