You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2022/08/25 15:12:45 UTC
[directory-server] branch master updated: Fix a failing test caused by the modification made in LdapCoreSessionConnection, as we now throw a LdapNoSuchObject exception instead dof returning an empty cursor when the searched DN does not exist.
This is an automated email from the ASF dual-hosted git repository.
elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git
The following commit(s) were added to refs/heads/master by this push:
new 795fa79f3a Fix a failing test caused by the modification made in LdapCoreSessionConnection, as we now throw a LdapNoSuchObject exception instead dof returning an empty cursor when the searched DN does not exist.
795fa79f3a is described below
commit 795fa79f3a4dd6c6e9ad2fe7dfdf9c9af035c12b
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Aug 25 17:12:31 2022 +0200
Fix a failing test caused by the modification made in
LdapCoreSessionConnection, as we now throw a LdapNoSuchObject exception
instead dof returning an empty cursor when the searched DN does not
exist.
---
.../directory/server/core/exception/ExceptionServiceIT.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java b/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
index 8eeea4e778..bff06785ba 100644
--- a/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
+++ b/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
@@ -113,10 +113,13 @@ public class ExceptionServiceIT extends AbstractLdapTestUnit
@Test
public void testFailSearchNoSuchObject() throws Exception
{
- EntryCursor cursor = getAdminConnection( getService() ).search( "ou=blah", "(objectClass=*)",
- SearchScope.ONELEVEL, "*" );
- assertFalse( cursor.next() );
- cursor.close();
+ Assertions.assertThrows( LdapNoSuchObjectException.class, () ->
+ {
+ try ( EntryCursor cursor = getAdminConnection( getService() ).search( "ou=blah", "(objectClass=*)",
+ SearchScope.ONELEVEL, "*" ) )
+ {
+ }
+ } );
}