directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1164831 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
Date Sat, 03 Sep 2011 08:34:10 GMT
Author: elecharny
Date: Sat Sep  3 08:34:09 2011
New Revision: 1164831

URL: http://svn.apache.org/viewvc?rev=1164831&view=rev
Log:
Cleaned up the test from all the logs and traces

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

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java?rev=1164831&r1=1164830&r2=1164831&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
Sat Sep  3 08:34:09 2011
@@ -60,8 +60,6 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Tests for replication subsystem in client-server mode.
@@ -70,7 +68,6 @@ import org.slf4j.LoggerFactory;
  */
 public class ClientServerReplicationIT
 {
-    private static final Logger CONSUMER_LOG = LoggerFactory.getLogger( "CONSUMER_LOG" );
     private static LdapServer providerServer;
 
     private static LdapServer consumerServer;
@@ -111,8 +108,8 @@ public class ClientServerReplicationIT
             searchRequest.setScope( SearchScope.SUBTREE );
             searchRequest.addAttributes( "entryUuid" );
             
-            CONSUMER_LOG.debug( "-----------> Dumping the server <-----------" );
-            CONSUMER_LOG.debug( "-----------> Looking for " + entryDn.getNormName() +
" <-----------" );
+            System.out.println( "-----------> Dumping the server <-----------" );
+            System.out.println( "-----------> Looking for " + entryDn.getNormName() +
" <-----------" );
             
             EntryFilteringCursor cursor = session.search( searchRequest );
             
@@ -122,18 +119,17 @@ public class ClientServerReplicationIT
                 
                 if ( entry.getDn().equals( entryDn ) )
                 {
-                    CONSUMER_LOG.debug( "The searched entry exists !!!" );
-                    CONSUMER_LOG.debug( "found Entry " + entry.getDn().getNormName() + "
exists, entrtyUuid = " + entry.get( "entryUuid" ) );
+                    System.out.println( "The searched entry exists !!!" );
+                    System.out.println( "found Entry " + entry.getDn().getNormName() + "
exists, entrtyUuid = " + entry.get( "entryUuid" ) );
                     continue;
                 }
                 
-                CONSUMER_LOG.debug( "Entry " + entry.getDn().getNormName() + " exists, entrtyUuid
= " + entry.get( "entryUuid" ) );
+                System.out.println( "Entry " + entry.getDn().getNormName() + " exists, entrtyUuid
= " + entry.get( "entryUuid" ) );
             }
             
             cursor.close();
 
-            CONSUMER_LOG.debug( "-----------> Dump done <-----------" );
-            //new Exception().printStackTrace();
+            System.out.println( "-----------> Dump done <-----------" );
         }
         catch ( Exception le )
         {
@@ -303,10 +299,10 @@ public class ClientServerReplicationIT
     
     
     @Test
-    @Ignore
+    @Ignore( "Run this test alone, otherwise it conflicts with moddn" )
     public void testModDnLoop() throws Exception
     {
-        for ( int i = 0; i < 10000; i++ )
+        for ( int i = 0; i < 10; i++ )
         {
             System.out.println( ">>>>>> loop " + ( i + 1 ) + " <<<<<<"
);
             Entry newuser = createEntry();
@@ -395,20 +391,17 @@ public class ClientServerReplicationIT
     private Entry restartConsumer( Entry provUser ) throws Exception
     {
         // Now stop the consumer
-        CONSUMER_LOG.debug( "--------------------------------------------------------------"
);
-        CONSUMER_LOG.debug( "----> 1 Stopping the consumer --------------------------------"
);
-        CONSUMER_LOG.debug( "--------------------------------------------------------------"
);
         consumerServer.stop();
         
         // And delete the entry in the provider
         Dn deletedUserDn = provUser.getDn();
-        //System.out.println( "----> 5 deleting entry " + deletedUserDn + " from provider
--------------------------------" );
+
         providerSession.delete( deletedUserDn );
         
         // Create a new entry
         provUser = createEntry();
         Dn addedUserDn = provUser.getDn();
-        //System.out.println( "----> 6 adding entry " + provUser.getDn() + " into provider
--------------------------------" );
+
         providerSession.add( provUser );
         
         // let the provider log the events before the consumer sends a request
@@ -417,57 +410,37 @@ public class ClientServerReplicationIT
         Thread.sleep( 1000 );
         
         // Restart the consumer
-        CONSUMER_LOG.debug( "--------------------------------------------------------------"
);
-        CONSUMER_LOG.debug( "----> 2 Restarting the consumer --------------------------------"
);
-        CONSUMER_LOG.debug( "--------------------------------------------------------------"
);
         consumerServer.start();
         
-        //assertTrue( consumerSession.exists( deletedUserDn ) );
-        //System.out.println( "----> 7bis entry " + deletedUserDn + " is still present
in consumer --------------------------------" );
-        
         assertTrue( checkEntryDeletion( consumerSession, deletedUserDn ) );
-        //System.out.println( "----> 8 Entry " + deletedUserDn + " deleted from consumer
--------------------------------" );
         
         assertTrue( checkEntryExistence( consumerSession, addedUserDn ) );
         waitAndCompareEntries( addedUserDn );
-        //System.out.println( "----> 8 Entry " + addedUserDn + " added into consumer --------------------------------"
);
 
         return provUser;
     }
     
     
     @Test
-    @Ignore( "we have some random failures" )
     public void testRebootConsumer() throws Exception
     {
-        System.out.println( "----> 1 testRebootConsumer started --------------------------------"
);
         Entry provUser = createEntry();
         
         assertFalse( providerSession.exists(provUser.getDn() ) );
         assertFalse( consumerSession.exists(provUser.getDn() ) );
         
-        System.out.println( "----> 2 Adding entry " + provUser.getDn() +" in provider
--------------------------------" );
         providerSession.add( provUser );
         
         assertTrue( checkEntryExistence( consumerSession, provUser.getDn() ) );
         waitAndCompareEntries( provUser.getDn() );
 
-        System.out.println( "----> 3 entry " + provUser.getDn() +" present in consumer
--------------------------------" );
-
         assertTrue( providerSession.exists(provUser.getDn() ) );
         assertTrue( consumerSession.exists(provUser.getDn() ) );
         
-        for ( int i = 0; i < 1000; i++ )
+        for ( int i = 0; i < 10; i++ )
         {
-            CONSUMER_LOG.debug( "=============================== Loop " + i );
-            System.out.println( "=============================== Loop " + i );
             provUser = restartConsumer( provUser );
         }
-        
-        CONSUMER_LOG.debug( "===========> Dumping the provider <===========" );
-        dump( providerSession, Dn.ROOT_DSE );
-        CONSUMER_LOG.debug( "===========> Dumping the consumer <===========" );
-        dump( consumerSession, Dn.ROOT_DSE );
     }
     
     



Mime
View raw message