This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git

commit ea33cbaefc98d415f90bed7e3d1a12cf8d3ffc78
Author: Gary Gregory <gardgreg...@gmail.com>
AuthorDate: Tue Jul 30 18:00:52 2019 -0400

    Sort methods.
---
 .../commons/dbcp2/TestDelegatingConnection.java    | 47 +++++++++++-----------
 1 file changed, 23 insertions(+), 24 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/dbcp2/TestDelegatingConnection.java 
b/src/test/java/org/apache/commons/dbcp2/TestDelegatingConnection.java
index f612baf..fe3aa57 100644
--- a/src/test/java/org/apache/commons/dbcp2/TestDelegatingConnection.java
+++ b/src/test/java/org/apache/commons/dbcp2/TestDelegatingConnection.java
@@ -35,6 +35,20 @@ import org.junit.jupiter.api.Test;
  */
 public class TestDelegatingConnection {
 
+    /**
+     * Delegate that will throw RTE on toString
+     * Used to validate fix for DBCP-241
+     */
+    static class RTEGeneratingConnection extends TesterConnection {
+        public RTEGeneratingConnection() {
+            super("","");
+        }
+        @Override
+        public String toString() {
+            throw new RuntimeException("bang!");
+        }
+
+    }
     private DelegatingConnection<? extends Connection> conn = null;
     private Connection delegateConn = null;
     private Connection delegateConn2 = null;
@@ -47,18 +61,6 @@ public class TestDelegatingConnection {
     }
 
     @Test
-    public void testGetDelegate() throws Exception {
-        assertEquals(delegateConn,conn.getDelegate());
-    }
-
-    @Test
-    public void testConnectionToString() throws Exception {
-        final String s = conn.toString();
-        assertNotNull(s);
-        assertTrue(s.length() > 0);
-    }
-
-    @Test
     public void testCheckOpen() throws Exception {
         conn.checkOpen();
         conn.close();
@@ -114,19 +116,16 @@ public class TestDelegatingConnection {
         }
     }
 
-    /**
-     * Delegate that will throw RTE on toString
-     * Used to validate fix for DBCP-241
-     */
-    static class RTEGeneratingConnection extends TesterConnection {
-        public RTEGeneratingConnection() {
-            super("","");
-        }
-        @Override
-        public String toString() {
-            throw new RuntimeException("bang!");
-        }
+    @Test
+    public void testConnectionToString() throws Exception {
+        final String s = conn.toString();
+        assertNotNull(s);
+        assertTrue(s.length() > 0);
+    }
 
+    @Test
+    public void testGetDelegate() throws Exception {
+        assertEquals(delegateConn,conn.getDelegate());
     }
 
     @Test

Reply via email to