directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1136548 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java
Date Thu, 16 Jun 2011 17:13:37 GMT
Author: elecharny
Date: Thu Jun 16 17:13:37 2011
New Revision: 1136548

URL: http://svn.apache.org/viewvc?rev=1136548&view=rev
Log:
Added a server restart so that the index can be created.

Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java?rev=1136548&r1=1136547&r2=1136548&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java
Thu Jun 16 17:13:37 2011
@@ -72,11 +72,18 @@ public class SearchWithIndicesIT extends
         // if nis is disabled then enable it
         if ( isNisDisabled )
         {
-            connection.modify( "cn=nis,ou=schema", new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
"m-disabled", "FALSE" ) );
+            connection.modify( "cn=nis,ou=schema", new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
"m-disabled", "TRUE" ) );
         }
 
+        nisEntry = connection.lookup( "cn=nis,ou=schema" );
+        isNisDisabled = nisEntry.contains( "m-disabled", "TRUE" );
+
         Partition systemPartition = getService().getSystemPartition();
         DefaultDirectoryServiceFactory.DEFAULT.getPartitionFactory().addIndex( systemPartition,
"gidNumber", 100 );
+        
+        // Restart the service so that the index is created
+        getService().shutdown();
+        getService().startup();
 
         // -------------------------------------------------------------------
         // Add a bunch of nis groups



Mime
View raw message