directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r569048 - in /directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server: DeleteIllegalDNITest.java SearchTest.java
Date Thu, 23 Aug 2007 15:36:57 GMT
Author: elecharny
Date: Thu Aug 23 08:36:54 2007
New Revision: 569048

URL: http://svn.apache.org/viewvc?rev=569048&view=rev
Log:
Cleaned the tests by removing useless stackTraces and log messages

Modified:
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/DeleteIllegalDNITest.java
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SearchTest.java

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/DeleteIllegalDNITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/DeleteIllegalDNITest.java?rev=569048&r1=569047&r2=569048&view=diff
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/DeleteIllegalDNITest.java
(original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/DeleteIllegalDNITest.java
Thu Aug 23 08:36:54 2007
@@ -56,16 +56,15 @@
         } 
         catch ( InvalidNameException ine ) 
         {
-        	System.out.println( "INE Error : " + ine.getMessage() );
             // Expected.
         } 
         catch ( NamingException ne )
         {
-        	System.out.println( "NE Error : " + ne );
+        	fail();
         }
         catch( Exception e )
         {
-        	System.out.println( "E Error : " + e.getMessage() );
+        	fail();
         }
         
         try
@@ -76,19 +75,16 @@
             
         	NamingEnumeration<SearchResult> result = ctx.search( "ou=system", "(objectClass=*)",
controls );
 
-            while ( result.hasMore() ) 
-            {
-                SearchResult sr = result.next();
-            }
+            assertTrue( result.hasMore() ); 
         } 
         catch ( InvalidNameException ine ) 
         {
-        	ine.printStackTrace();
+        	fail();
             // Expected.
         } 
         catch ( NamingException ne )
         {
-        	ne.printStackTrace();
+        	fail();
         }
     }
 }

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SearchTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SearchTest.java?rev=569048&r1=569047&r2=569048&view=diff
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SearchTest.java
(original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/SearchTest.java
Thu Aug 23 08:36:54 2007
@@ -1038,7 +1038,6 @@
         catch ( NamingException ne )
         {
         	assertTrue( true );
-        	ne.printStackTrace();
         }
     }
     



Mime
View raw message