directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r536669 - /directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java
Date Wed, 09 May 2007 21:49:41 GMT
Author: erodriguez
Date: Wed May  9 14:49:40 2007
New Revision: 536669

URL: http://svn.apache.org/viewvc?view=rev&rev=536669
Log:
Removed console error logging from SaslBindTest.

Modified:
    directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java

Modified: directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java?view=diff&rev=536669&r1=536668&r2=536669
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java
Wed May  9 14:49:40 2007
@@ -165,31 +165,24 @@
             Attributes attrs = ctx.getAttributes( "ldap://localhost:" + port, new String[]
                 { "supportedSASLMechanisms" } );
 
-            try
-            {
-                NamingEnumeration answer = attrs.getAll();
+            NamingEnumeration answer = attrs.getAll();
 
-                if ( answer.hasMore() )
-                {
-                    Attribute result = ( Attribute ) answer.next();
-                    assertTrue( result.size() == 3 );
-                    assertTrue( result.contains( "GSSAPI" ) );
-                    assertTrue( result.contains( "DIGEST-MD5" ) );
-                    assertTrue( result.contains( "CRAM-MD5" ) );
-                }
-                else
-                {
-                    fail();
-                }
+            if ( answer.hasMore() )
+            {
+                Attribute result = ( Attribute ) answer.next();
+                assertTrue( result.size() == 3 );
+                assertTrue( result.contains( "GSSAPI" ) );
+                assertTrue( result.contains( "DIGEST-MD5" ) );
+                assertTrue( result.contains( "CRAM-MD5" ) );
             }
-            catch ( NamingException e )
+            else
             {
-                e.printStackTrace();
+                fail( "Should have returned 3 SASL mechanisms." );
             }
         }
         catch ( NamingException e )
         {
-            e.printStackTrace();
+            fail( "Should not have caught exception." );
         }
     }
 
@@ -224,7 +217,6 @@
         }
         catch ( NamingException e )
         {
-            System.err.println( "Problem getting attribute:  " + e );
             fail( "Should not have caught exception." );
         }
     }
@@ -290,7 +282,6 @@
         }
         catch ( NamingException e )
         {
-            System.err.println( "Problem getting attribute:  " + e );
             fail( "Should not have caught exception." );
         }
     }
@@ -366,8 +357,6 @@
         }
         catch ( NamingException e )
         {
-            e.printStackTrace();
-            System.err.println( "Problem getting attribute:  " + e );
             fail( "Should not have caught exception." );
         }
     }
@@ -474,8 +463,6 @@
         }
         catch ( NamingException e )
         {
-            e.printStackTrace();
-            System.err.println( "Problem getting attribute:  " + e );
             fail( "Should not have caught exception." );
         }
     }
@@ -507,7 +494,6 @@
         }
         catch ( NamingException e )
         {
-            e.printStackTrace();
             assertTrue( e.getMessage().contains( "Invalid response" ) );
         }
     }



Mime
View raw message