directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r893108 - /directory/sandbox/kayyagari/integ-test-framework/src/test/java/org/apache/directory/server/core/integ/TestClassB.java
Date Tue, 22 Dec 2009 08:10:38 GMT
Author: kayyagari
Date: Tue Dec 22 08:10:36 2009
New Revision: 893108

URL: http://svn.apache.org/viewvc?rev=893108&view=rev
Log:
fixed the failing test when run in standalone mode

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

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=893108&r1=893107&r2=893108&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
Tue Dec 22 08:10:36 2009
@@ -10,6 +10,13 @@
 import org.junit.runner.RunWith;
 
 @RunWith( FrameworkRunner.class )
+@ApplyLdifs(
+    {
+        "dn: cn=testClassB,ou=system\n" + 
+        "objectClass: person\n" + 
+        "cn: testClassB\n" + 
+        "sn: sn_testClassB\n"
+    })
 public class TestClassB
 {
 
@@ -20,6 +27,7 @@
     public void testWithFactoryAnnotation() throws Exception
     {
         assertFalse( service.getAdminSession().exists( new LdapDN( "cn=testSuite,ou=system"
) ) );
+        assertFalse( service.getAdminSession().exists( new LdapDN( "cn=testClassB,ou=system"
) ) );
     }
     
     
@@ -27,6 +35,9 @@
     public void testWithoutFactoryAnnotation() throws Exception
     {
         // this assertion will only work if ran as part of TestSuite
-        assertTrue( service.getAdminSession().exists( new LdapDN( "cn=testSuite,ou=system"
) ) );
+        // 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=testClassB,ou=system"
) ) );
     }
 }



Mime
View raw message