Repository: commons-dbcp Updated Branches: refs/heads/master 12d010b54 -> 34b9351a4
Better assert message. Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/34b9351a Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/34b9351a Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/34b9351a Branch: refs/heads/master Commit: 34b9351a4f22a582a8c74d15777ec36447a8af31 Parents: 12d010b Author: Gary Gregory <ggreg...@apache.org> Authored: Sat Oct 28 12:56:17 2017 -0600 Committer: Gary Gregory <ggreg...@apache.org> Committed: Sat Oct 28 12:56:17 2017 -0600 ---------------------------------------------------------------------- .../org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/34b9351a/src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java b/src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java index 7874f7b..8aa8bd7 100644 --- a/src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java +++ b/src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java @@ -96,7 +96,8 @@ public class TestAbandonedBasicDataSource extends TestBasicDataSource { // Second close on conn1 is OK as of dbcp 1.3 conn1.close(); assertEquals(0, ds.getNumActive()); - assertTrue(sw.toString().contains("testAbandonedClose")); + final String string = sw.toString(); + assertTrue(string, string.contains("testAbandonedClose")); } @Test @@ -129,7 +130,8 @@ public class TestAbandonedBasicDataSource extends TestBasicDataSource { try { conn1.close(); } catch (final SQLException ex) { } assertEquals(0, ds.getNumActive()); - assertTrue(sw.toString().contains("testAbandonedCloseWithExceptions")); + final String string = sw.toString(); + assertTrue(string, string.contains("testAbandonedCloseWithExceptions")); } /**