You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by co...@apache.org on 2014/12/28 01:45:17 UTC

svn commit: r1648137 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java

Author: coheigea
Date: Sun Dec 28 00:45:17 2014
New Revision: 1648137

URL: http://svn.apache.org/r1648137
Log:
[DIRSERVER-2037] - ClientInitialRefreshIT test failures

Modified:
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java?rev=1648137&r1=1648136&r2=1648137&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java Sun Dec 28 00:45:17 2014
@@ -385,13 +385,17 @@ public class ClientInitialRefreshIT
         Entry addedEntry = createEntry();
         providerSession.add( addedEntry );
 
-        // Now check that the entry has been copied in the consumer
-        assertTrue( waitForSyncReplClient( consumer, 1 ) );
-
-        // Removed the added entry
-        providerSession.delete( addedEntry.getDn() );
-        consumer.stop();
-
+        try 
+        {
+            // Now check that the entry has been copied in the consumer
+            assertTrue( waitForSyncReplClient( consumer, 1 ) );
+        }
+        finally
+        {
+            // Removed the added entry
+            providerSession.delete( addedEntry.getDn() );
+            consumer.stop();
+        }
         //System.out.println( "\n<-- Done" );
     }
 
@@ -408,8 +412,10 @@ public class ClientInitialRefreshIT
         ReplicationConsumer consumer = createConsumer();
 
         // Load all the entries
-        waitUntilLimitSyncReplClient( TOTAL_COUNT, consumer );
+        assertTrue( waitUntilLimitSyncReplClient( TOTAL_COUNT, consumer ) );
 
+        Thread.sleep( 500 );
+        
         // Stop the consumer
         consumer.stop();
 
@@ -426,13 +432,19 @@ public class ClientInitialRefreshIT
         // Start it again
         runConsumer( consumer );
 
-        // We should get only the additional values cause consumer sends a cookie now
-        assertTrue( waitForSyncReplClient( consumer, additionalCount ) );
-        consumer.stop();
-
-        for ( Dn dn : newEntries )
+        try
+        {
+            // We should get only the additional values cause consumer sends a cookie now
+            assertTrue( waitForSyncReplClient( consumer, additionalCount ) );
+        }
+        finally
         {
-            providerSession.delete( dn );
+            for ( Dn dn : newEntries )
+            {
+                providerSession.delete( dn );
+            }
+            
+            consumer.stop();
         }
 
         //System.out.println( "\n<-- Done" );