You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2014/04/23 01:04:41 UTC

svn commit: r1589303 - /tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

Author: kkolinko
Date: Tue Apr 22 23:04:40 2014
New Revision: 1589303

URL: http://svn.apache.org/r1589303
Log:
Additional information for debugging the test:
log on which iteration it failed.

(It is possible to chain AssertionErrors, but JUnit does not print stack trace for the nested AE. Thus I am resorting to writing them to the log).

Modified:
    tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java?rev=1589303&r1=1589302&r2=1589303&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java Tue Apr 22 23:04:40 2014
@@ -134,10 +134,11 @@ public class TestSsl extends TomcatBaseT
                 requestCount++;
                 doRequest(os, r);
             }
-        } catch (IOException ioe) {
-            Assert.fail("Failed on request number " + requestCount +
-                    " after startHandshake()");
-            throw ioe;
+        } catch (AssertionError | IOException e) {
+            String message = "Failed on request number " + requestCount
+                    + " after startHandshake(). " + e.getMessage();
+            log.error(message, e);
+            Assert.fail(message);
         }
 
         Assert.assertTrue(listener.isComplete());



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org