directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r893750 - in /directory/sandbox/kayyagari/integ-test-framework/src: main/java/org/apache/directory/server/core/integ/ test/java/org/apache/directory/server/core/integ/
Date Thu, 24 Dec 2009 13:08:20 GMT
Author: kayyagari
Date: Thu Dec 24 13:08:20 2009
New Revision: 893750

URL: http://svn.apache.org/viewvc?rev=893750&view=rev
Log:
o fixed an issue with creating a default suite level DS when a class and suite doesn't have
@DSBuilder
o removed offending assert statements which are only valid when the classes are run as part
of suite

Modified:
    directory/sandbox/kayyagari/integ-test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
    directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassA.java
    directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassB.java
    directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassC.java

Modified: directory/sandbox/kayyagari/integ-test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/integ-test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java?rev=893750&r1=893749&r2=893750&view=diff
==============================================================================
--- directory/sandbox/kayyagari/integ-test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
(original)
+++ directory/sandbox/kayyagari/integ-test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
Thu Dec 24 13:08:20 2009
@@ -332,20 +332,19 @@
                     applyLdifs( methodLdifs, service );
                 }
             }
-            else if( suite != null )
+            else if( suite != null && suite.getSuiteService() == null )
             {
                 // Use the default DS
                 DirectoryServiceFactory dsf = FrameworkDirectoryServiceFactory.DEFAULT;
                 dsf.init( "suite-" + UUID.randomUUID().toString() );
                 service = dsf.getDirectoryService();
                 
-                suite.setSuiteService( service );
-                
                 // same as in above else-if condition 
                 // apply the suite LDIFs first, these will never be reverted
                 // during the running time of a test suite
                 applyLdifs( suiteLdifs, service );
 
+                suite.setSuiteService( service );
                 // get the current revision, we need it to revert the modifications
                 revision = service.getChangeLog().getCurrentRevision();
 

Modified: directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassA.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassA.java?rev=893750&r1=893749&r2=893750&view=diff
==============================================================================
--- directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassA.java
(original)
+++ directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassA.java
Thu Dec 24 13:08:20 2009
@@ -49,7 +49,6 @@
         })
     public void testWithFactoryAnnotation() throws Exception
     {
-        assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testSuite,ou=system"
) ) );
         assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testClassA,ou=system"
) ) );
         assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testMethodA,ou=system"
) ) );
     }
@@ -65,7 +64,6 @@
         })
     public void testWithoutFactoryAnnotation() throws Exception
     {
-        assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testSuite,ou=system"
) ) );
         assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testClassA,ou=system"
) ) );
         assertFalse( service.getAdminSession().exists( new LdapDN( "cn=testMethodA,ou=system"
) ) );
         assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testMethodWithApplyLdif,ou=system"
) ) );

Modified: directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassB.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassB.java?rev=893750&r1=893749&r2=893750&view=diff
==============================================================================
--- directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassB.java
(original)
+++ directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassB.java
Thu Dec 24 13:08:20 2009
@@ -40,7 +40,6 @@
     @DSBuilder( factory=FrameworkDirectoryServiceFactory.class, name="test" )
     public void testWithFactoryAnnotation() throws Exception
     {
-        assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testSuite,ou=system"
) ) );
         assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testClassB,ou=system"
) ) );
     }
     
@@ -52,7 +51,6 @@
         // commenting this to make maven report test success, uncomment in an IDE
         // while running the TestSuite
         // assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testSuite,ou=system"
) ) );
-        assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testSuite,ou=system"
) ) );
         assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testClassB,ou=system"
) ) );
     }
 }

Modified: directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassC.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassC.java?rev=893750&r1=893749&r2=893750&view=diff
==============================================================================
--- directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassC.java
(original)
+++ directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassC.java
Thu Dec 24 13:08:20 2009
@@ -39,7 +39,6 @@
     @Test
     public void testWithoutMethodOrClassLevelFactory() throws Exception
     {
-        assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testSuite,ou=system"
) ) );
         assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testClassC,ou=system"
) ) );
         
         // the below DN will be injected in TestClassB when ran as suite, but that DN



Mime
View raw message