james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r681541 - /james/server/trunk/mailets-function/src/test/java/org/apache/james/transport/remotedeliverytester/AbstractRemoteDeliveryTest.java
Date Thu, 31 Jul 2008 23:13:14 GMT
Author: bago
Date: Thu Jul 31 16:13:13 2008
New Revision: 681541

URL: http://svn.apache.org/viewvc?rev=681541&view=rev
Log:
Add debug to investigate on JAMES-850

Modified:
    james/server/trunk/mailets-function/src/test/java/org/apache/james/transport/remotedeliverytester/AbstractRemoteDeliveryTest.java

Modified: james/server/trunk/mailets-function/src/test/java/org/apache/james/transport/remotedeliverytester/AbstractRemoteDeliveryTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mailets-function/src/test/java/org/apache/james/transport/remotedeliverytester/AbstractRemoteDeliveryTest.java?rev=681541&r1=681540&r2=681541&view=diff
==============================================================================
--- james/server/trunk/mailets-function/src/test/java/org/apache/james/transport/remotedeliverytester/AbstractRemoteDeliveryTest.java
(original)
+++ james/server/trunk/mailets-function/src/test/java/org/apache/james/transport/remotedeliverytester/AbstractRemoteDeliveryTest.java
Thu Jul 31 16:13:13 2008
@@ -35,6 +35,7 @@
 import java.util.Properties;
 import java.util.Random;
 
+import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
 public abstract class AbstractRemoteDeliveryTest extends TestCase {
@@ -385,11 +386,19 @@
         assertEquals(0, waitEmptySpool(10000));
         
         // Checks
-        assertWhole(tester.getTestStatus(), 5, 4);
-        assertServer(tester.getTestStatus(), servers[0][1], 5, 4);
-        assertEquals(2, tester.getProcMails().size());
-        assertProcMail(mails.get("a@test.it"), ProcMail.STATE_SENT_ERROR, 4, 1, servers[0][1]);
-        assertProcMail(mails.get("b@test.it"), ProcMail.STATE_SENT_ERROR, 1, 1, servers[0][1]);
+        try {
+            assertWhole(tester.getTestStatus(), 5, 4);
+            assertServer(tester.getTestStatus(), servers[0][1], 5, 4);
+            assertEquals(2, tester.getProcMails().size());
+            assertProcMail(mails.get("a@test.it"), ProcMail.STATE_SENT_ERROR, 4, 1, servers[0][1]);
+            assertProcMail(mails.get("b@test.it"), ProcMail.STATE_SENT_ERROR, 1, 1, servers[0][1]);
+        } catch (AssertionFailedError e) {
+            // TEMPORARILY add a dump stack on failure to 
+            // see if we have a deadlock (unlikely) or simply the
+            // notification is not working properly. (see JAMES-850)
+            Thread.dumpStack();
+            throw e;
+        }
     }
 
     /**



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


Mime
View raw message