You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ba...@apache.org on 2008/08/09 12:14:20 UTC

svn commit: r684215 - /james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java

Author: bago
Date: Sat Aug  9 03:14:20 2008
New Revision: 684215

URL: http://svn.apache.org/viewvc?rev=684215&view=rev
Log:
More logging for the tests (debugging an issue on hudson)

Modified:
    james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java

Modified: james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java?rev=684215&r1=684214&r2=684215&view=diff
==============================================================================
--- james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java (original)
+++ james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java Sat Aug  9 03:14:20 2008
@@ -62,6 +62,7 @@
 import java.util.Locale;
 import java.util.Map;
 
+import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
 public abstract class AbstractYamlTest extends TestCase {
@@ -133,6 +134,8 @@
         if (log == null) {
                 log = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG, "root");
         }
+        
+        log.info("Running test: "+getName()+" ...");
 
         if (parser == null) {
             /* PREVIOUS SLOW WAY 
@@ -218,10 +221,17 @@
                 SPFResult res = runSingleTest(next);
                 queries.put(next, res);
             }
+            AssertionFailedError firstError = null; 
             for (Iterator i = queries.keySet().iterator(); i.hasNext(); ) {
                 String next = (String) i.next();
-                verifyResult(next, (SPFResult) queries.get(next));
+                try {
+                    verifyResult(next, (SPFResult) queries.get(next));
+                } catch (AssertionFailedError e) {
+                    log.getChildLogger(next).info("FAILED. "+e.getMessage()+" ("+getName()+")");
+                    if (firstError == null) firstError = e;
+                }
             }
+            if (firstError != null) throw firstError;
         }
         
     }



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