commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1564282 - /commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/AsyncQueryRunnerTest.java
Date Tue, 04 Feb 2014 13:12:06 GMT
Author: sebb
Date: Tue Feb  4 13:12:06 2014
New Revision: 1564282

URL: http://svn.apache.org/r1564282
Log:
Add code to try and debug Continuum failure

Modified:
    commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/AsyncQueryRunnerTest.java

Modified: commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/AsyncQueryRunnerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/AsyncQueryRunnerTest.java?rev=1564282&r1=1564281&r2=1564282&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/AsyncQueryRunnerTest.java
(original)
+++ commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/AsyncQueryRunnerTest.java
Tue Feb  4 13:12:06 2014
@@ -40,6 +40,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
+import org.mockito.exceptions.verification.junit.ArgumentsAreDifferent;
 
 @SuppressWarnings("boxing") // test code
 public class AsyncQueryRunnerTest {
@@ -448,10 +449,29 @@ public class AsyncQueryRunnerTest {
     	runner.insert(conn, "3", handler);
     	runner.insert(conn, "4", handler, "param1");
     	
-    	verify(mockQueryRunner).insert("1", handler);
+    	boolean failed = false;
+    	try {
+            verify(mockQueryRunner).insert("1", handler);
+        } catch (AssertionError e) {
+            failed = true;
+            e.printStackTrace();
+        }
+        try {
     	verify(mockQueryRunner).insert("2", handler, "param1");
+        } catch (AssertionError e) {
+            failed = true;
+            e.printStackTrace();
+        }
+        try {
     	verify(mockQueryRunner).insert(conn, "3", handler);
+        } catch (AssertionError e) {
+            failed = true;
+            e.printStackTrace();
+        }
     	verify(mockQueryRunner).insert(conn, "4", handler, "param1");
+    	if (failed) {
+    	    throw new AssertionError("One or more failures detected");
+    	}
     }
 
     @Test(expected=ExecutionException.class)



Mime
View raw message