commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thecarlh...@apache.org
Subject [24/50] commons-dbutils git commit: Don't swallow test errors silently. Test works when running mvn clean test, so remove try-catch-block.
Date Fri, 07 Jul 2017 02:05:59 GMT
Don't swallow test errors silently. Test works when running mvn clean test, so remove try-catch-block.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk@1630537 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/commons-dbutils/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbutils/commit/bdf0b337
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbutils/tree/bdf0b337
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbutils/diff/bdf0b337

Branch: refs/heads/master
Commit: bdf0b337ea209c7e3fd7de52f4da3b1afa0678aa
Parents: 82bb44f
Author: Benedikt Ritter <britter@apache.org>
Authored: Thu Oct 9 17:22:05 2014 +0000
Committer: Benedikt Ritter <britter@apache.org>
Committed: Thu Oct 9 17:22:05 2014 +0000

----------------------------------------------------------------------
 .../apache/commons/dbutils/QueryLoaderTest.java | 23 +++++++-------------
 1 file changed, 8 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbutils/blob/bdf0b337/src/test/java/org/apache/commons/dbutils/QueryLoaderTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/dbutils/QueryLoaderTest.java b/src/test/java/org/apache/commons/dbutils/QueryLoaderTest.java
index c4f42b6..957b309 100644
--- a/src/test/java/org/apache/commons/dbutils/QueryLoaderTest.java
+++ b/src/test/java/org/apache/commons/dbutils/QueryLoaderTest.java
@@ -28,22 +28,15 @@ public class QueryLoaderTest extends BaseTestCase {
         "/org/apache/commons/dbutils/TestQueries.properties";
 
     public void testLoad() throws IOException {
-        try {
-            QueryLoader loader = QueryLoader.instance();
-            Map<String,String> q = loader.load(QUERIES);
-            Map<String,String> q2 = loader.load(QUERIES);
-            assertTrue(q == q2); // pointer comparison should return true
-            assertEquals("SELECT * FROM SomeTable", q.get("test.query"));
+        QueryLoader loader = QueryLoader.instance();
+        Map<String,String> q = loader.load(QUERIES);
+        Map<String,String> q2 = loader.load(QUERIES);
+        assertTrue(q == q2); // pointer comparison should return true
+        assertEquals("SELECT * FROM SomeTable", q.get("test.query"));
 
-            loader.unload(QUERIES);
-            Map<String,String> q3 = loader.load(QUERIES);
-            assertTrue(q != q3); // pointer comparison should return false
-
-        } catch (IllegalArgumentException e) {
-            // TODO Figure out why the Maven build can't find the properties
-            // file.  The tests run fine in Eclipse so just catch this
-            // exception for now.
-        }
+        loader.unload(QUERIES);
+        Map<String,String> q3 = loader.load(QUERIES);
+        assertTrue(q != q3); // pointer comparison should return false
     }
 
 }


Mime
View raw message