From a1bfdf504c091b7b0d67aae10fcf0ffa186c0dbd Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 08 Apr 2009 10:21:29 +0000
Subject: [PATCH] Fix for issue 2764 (ldapsearch: "--countEntries" option, the number of matching entries should not be used as return code) --This line, and th se below, will be ignored--

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java
index b385a40..09f93a0 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Copyright 2006-2009 Sun Microsystems, Inc.
  */
 package org.opends.server.tools;
 
@@ -75,12 +75,12 @@
          throws Exception
   {
     TestCaseUtils.startServer();
-    
+
     TestCaseUtils.dsconfig(
             "set-sasl-mechanism-handler-prop",
             "--handler-name", "DIGEST-MD5",
             "--set", "server-fqdn:" + "127.0.0.1");
-    
+
     File pwFile = File.createTempFile("valid-bind-password-", ".txt");
     pwFile.deleteOnExit();
     FileWriter fileWriter = new FileWriter(pwFile);
@@ -99,7 +99,7 @@
 
   @AfterClass
   public void tearDown() throws Exception {
-   
+
     TestCaseUtils.dsconfig(
             "set-sasl-mechanism-handler-prop",
             "--handler-name", "DIGEST-MD5",
@@ -1642,7 +1642,7 @@
       "(objectClass=*)"
     };
 
-    assertEquals(LDAPSearch.mainSearch(args, false, null, System.err), 1);
+    assertEquals(LDAPSearch.mainSearch(args, false, true, null, System.err), 1);
 
     args = new String[]
     {
@@ -1658,7 +1658,7 @@
       "(objectClass=*)"
     };
 
-    assertEquals(LDAPSearch.mainSearch(args, false, null, System.err), 2);
+    assertEquals(LDAPSearch.mainSearch(args, false, true, null, System.err), 2);
 
     args = new String[]
     {
@@ -1674,7 +1674,7 @@
       "(objectClass=*)"
     };
 
-    assertEquals(LDAPSearch.mainSearch(args, false, null, System.err), 2);
+    assertEquals(LDAPSearch.mainSearch(args, false, true, null, System.err), 2);
   }
 
 
@@ -1761,7 +1761,7 @@
       "(objectClass=*)"
     };
 
-    assertEquals(LDAPSearch.mainSearch(args, false, null, System.err), 5);
+    assertEquals(LDAPSearch.mainSearch(args, false, true, null, System.err), 5);
   }
 
 
@@ -1900,8 +1900,9 @@
       "(objectClass=*)"
     };
 
-    assertEquals(LDAPSearch.mainSearch(pagedArgs, false, null, System.err),
-                 LDAPSearch.mainSearch(unpagedArgs, false, null, System.err));
+    assertEquals(
+        LDAPSearch.mainSearch(pagedArgs, false, true, null, System.err),
+        LDAPSearch.mainSearch(unpagedArgs, false, true, null, System.err));
   }
 
 

--
Gitblit v1.10.0