directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r900739 - /directory/apacheds/trunk/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
Date Tue, 19 Jan 2010 11:47:01 GMT
Author: kayyagari
Date: Tue Jan 19 11:47:01 2010
New Revision: 900739

URL: http://svn.apache.org/viewvc?rev=900739&view=rev
Log:
merging the changes applied in the CiDIT branch

Modified:
    directory/apacheds/trunk/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
  (contents, props changed)

Modified: directory/apacheds/trunk/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java?rev=900739&r1=900738&r2=900739&view=diff
==============================================================================
--- directory/apacheds/trunk/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
(original)
+++ directory/apacheds/trunk/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
Tue Jan 19 11:47:01 2010
@@ -32,6 +32,7 @@
 import org.apache.directory.server.core.partition.ldif.LdifPartition;
 import org.apache.directory.server.core.schema.SchemaPartition;
 import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.protocol.shared.transport.Transport;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
@@ -39,6 +40,7 @@
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
 import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
+import org.apache.mina.util.AvailablePortFinder;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -122,6 +124,18 @@
         server = cpReader.getLdapServer();
         server.setDirectoryService( dirService );
 
+        // this is a hack to use a different port than the one
+        // configured in the actual configuration data
+        // in case the configured port is already in use during the test run
+        Transport[] transports = server.getTransports();
+        for( Transport t : transports )
+        {
+            int port = t.getPort();
+            port = AvailablePortFinder.getNextAvailable( port );
+            t.setPort( port );
+            t.init();
+        }
+
         server.start();
     }
 

Propchange: directory/apacheds/trunk/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 19 11:47:01 2010
@@ -1,2 +1,3 @@
 /directory/apacheds/branches/apacheds-replication/core-annotations/src/main/java/org/apache/directory/server/core/factory/CiDITDirectoryServiceFactory.java:749790-764110
 /directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/factory/CiDITDirectoryServiceFactory.java:806623-896441
+/directory/apacheds/branches/cidit/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:900288-900681



Mime
View raw message