directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1024209 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
Date Tue, 19 Oct 2010 11:51:31 GMT
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() );
         }
     }



Mime
View raw message