directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1637531 - /directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java
Date Sat, 08 Nov 2014 09:02:02 GMT
Author: elecharny
Date: Sat Nov  8 09:02:02 2014
New Revision: 1637531

URL: http://svn.apache.org/r1637531
Log:
Another fix for DIRSERVER-2015 (the test was still failing on linux with Java 8)

Modified:
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java?rev=1637531&r1=1637530&r2=1637531&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java
Sat Nov  8 09:02:02 2014
@@ -26,9 +26,7 @@ import static org.junit.Assert.assertTru
 import static org.junit.Assert.fail;
 
 import java.io.File;
-import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.io.FileUtils;
@@ -182,6 +180,10 @@ public class NestedFilterTest extends Ab
     @Test
     public void testNestedAndnOr() throws Exception
     {
+        // This filter will get back 3 entries :
+        // ou=Apache,ou=Board of Directors,o=Good Times Co.
+        // cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.
+        // commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co.
         String filter = "(|(&(cn=J*)(sn=w*))(ou=apache))";
 
         ExprNode exprNode = FilterParser.parse( schemaManager, filter );
@@ -195,28 +197,20 @@ public class NestedFilterTest extends Ab
         expectedUuid.add( Strings.getUUID( 7 ) );
         expectedUuid.add( Strings.getUUID( 9 ) );
 
-        Map<String, String> expectedCn = new HashMap<String, String>();
-        expectedCn.put( Strings.getUUID( 5 ), "JOhnny WAlkeR" );
-        expectedCn.put( Strings.getUUID( 7 ), "Apache" );
-        expectedCn.put( Strings.getUUID( 9 ), "Jim Bean" );
-
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
         Entry entry = cursor.get();
         assertTrue( expectedUuid.contains( entry.get( "entryUUID" ).getString() ) );
-        assertEquals( expectedCn.get( entry.get( "entryUUID" ).getString() ), entry.get(
"cn" ).getString() );
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
         entry = cursor.get();
         assertTrue( expectedUuid.contains( entry.get( "entryUUID" ).getString() ) );
-        assertEquals( expectedCn.get( entry.get( "entryUUID" ).getString() ), entry.get(
"ou" ).getString() );
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
         entry = cursor.get();
         assertTrue( expectedUuid.contains( entry.get( "entryUUID" ).getString() ) );
-        assertEquals( expectedCn.get( entry.get( "entryUUID" ).getString() ), entry.get(
"cn" ).getString() );
 
         assertFalse( cursor.next() );
         cursor.close();



Mime
View raw message