directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r955985 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
Date Fri, 18 Jun 2010 12:48:04 GMT
Author: elecharny
Date: Fri Jun 18 12:48:04 2010
New Revision: 955985

URL: http://svn.apache.org/viewvc?rev=955985&view=rev
Log:
Added a test to demonstrate that DIRSERVER-1330 is fixed

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

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java?rev=955985&r1=955984&r2=955985&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
Fri Jun 18 12:48:04 2010
@@ -1861,4 +1861,27 @@ public class SearchIT extends AbstractLd
        }
    }
 
+
+   @Test
+   public void testSearchFilterBadAttributeType() throws Exception
+   {
+       SearchControls controls = new SearchControls();
+       controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
+       controls.setDerefLinkFlag( false );
+       sysRoot.addToEnvironment( JndiPropertyConstants.JNDI_LDAP_DAP_DEREF_ALIASES,
+               AliasDerefMode.NEVER_DEREF_ALIASES.getJndiValue() );
+       HashMap<String, Attributes> map = new HashMap<String, Attributes>();
+
+       NamingEnumeration<SearchResult> list = sysRoot.search( "", "(|(badAttr={0})(ou={1}))",
new Object[]
+           { "testing00", "testing01" }, controls );
+       
+       while ( list.hasMore() )
+       {
+           SearchResult result = list.next();
+           map.put( result.getName(), result.getAttributes() );
+       }
+
+       assertEquals( "Expected number of results returned was incorrect!", 1, map.size()
);
+       assertTrue( map.containsKey( "ou=testing01,ou=system" ) );
+   }
 }



Mime
View raw message