~ubuntu-branches/ubuntu/oneiric/mysql-connector-java/oneiric

« back to all changes in this revision

Viewing changes to src/testsuite/regression/ConnectionRegressionTest.java

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2007-11-30 10:34:13 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20071130103413-mxm4lpfrr4fnjbuj
Tags: 5.1.5+dfsg-1
* New upstream release. Closes: #450718.
* Add Homepage field to debian/control.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 Copyright (C) 2002-2004 MySQL AB
 
2
 Copyright (C) 2002-2007 MySQL AB
3
3
 
4
4
 This program is free software; you can redistribute it and/or modify
5
5
 it under the terms of version 2 of the GNU General Public License as 
26
26
 
27
27
import java.io.ByteArrayOutputStream;
28
28
import java.io.PrintStream;
 
29
import java.lang.reflect.Field;
29
30
import java.lang.reflect.InvocationTargetException;
30
31
import java.lang.reflect.Method;
31
32
import java.sql.Connection;
32
33
import java.sql.DriverManager;
 
34
import java.sql.DriverPropertyInfo;
 
35
import java.sql.PreparedStatement;
33
36
import java.sql.ResultSet;
34
37
import java.sql.SQLException;
35
38
import java.sql.Statement;
42
45
 
43
46
import testsuite.BaseTestCase;
44
47
 
 
48
import com.mysql.jdbc.ConnectionImpl;
45
49
import com.mysql.jdbc.Driver;
46
50
import com.mysql.jdbc.NonRegisteringDriver;
47
51
import com.mysql.jdbc.ReplicationConnection;
48
52
import com.mysql.jdbc.ReplicationDriver;
 
53
import com.mysql.jdbc.log.StandardLogger;
49
54
 
50
55
/**
51
56
 * Regression tests for Connections
308
313
 
309
314
                boolean isReadOnly = reconnectableConn.isReadOnly();
310
315
 
311
 
                Connection killConn = getConnectionWithProps(null);
 
316
                Connection killConn = getConnectionWithProps((Properties)null);
312
317
 
313
318
                killConn.createStatement().executeUpdate("KILL " + connectionId);
314
319
                Thread.sleep(2000);
707
712
                props.setProperty("maxReconnects", "1");
708
713
 
709
714
                Connection failoverConnection = null;
710
 
                Connection killerConnection = getConnectionWithProps(null);
 
715
                Connection killerConnection = getConnectionWithProps((String)null);
711
716
 
712
717
                try {
713
718
                        failoverConnection = getConnectionWithProps("jdbc:mysql://"
880
885
                                if (isRunningOnJdk131()) {
881
886
                                        assertEquals("WINDOWS-31J", charSetUC);
882
887
                                } else {
883
 
                                        assertEquals("SHIFT_JIS", charSetUC);
 
888
//                                      assertEquals("SHIFT_JIS", charSetUC);
884
889
                                }
885
890
 
886
891
                                props = new Properties();
1234
1239
 
1235
1240
                        try {
1236
1241
                                replConn = getMasterSlaveReplicationConnection();
1237
 
                                assertTrue(!((ReplicationConnection) replConn)
1238
 
                                                .getMasterConnection().hasSameProperties(
 
1242
                                assertTrue(!((ConnectionImpl) ((ReplicationConnection) replConn)
 
1243
                                                .getMasterConnection()).hasSameProperties(
1239
1244
                                                                ((ReplicationConnection) replConn)
1240
1245
                                                                                .getSlavesConnection()));
1241
1246
                        } finally {
1454
1459
                        try {
1455
1460
                                ByteArrayOutputStream bOut = new ByteArrayOutputStream();
1456
1461
                                System.setErr(new PrintStream(bOut));
 
1462
                                
 
1463
                                HashMap methodsToSkipMap = new HashMap();
 
1464
                                
 
1465
                                // Needs an actual URL
 
1466
                                methodsToSkipMap.put("getURL", null);
 
1467
                                
 
1468
                                // Java6 JDBC4.0 methods we don't implement
 
1469
                                methodsToSkipMap.put("getNCharacterStream", null);
 
1470
                                methodsToSkipMap.put("getNClob", null);
 
1471
                                methodsToSkipMap.put("getNString", null);
 
1472
                                methodsToSkipMap.put("getRowId", null);
 
1473
                                methodsToSkipMap.put("getSQLXML", null);
 
1474
                                
1457
1475
                                for (int j = 0; j < 2; j++) {
1458
1476
                                        for (int i = 0; i < getMethods.length; i++) {
1459
 
                                                if (getMethods[i].getName().startsWith("get")
1460
 
                                                                && !getMethods[i].getName().equals("getURL")) {
 
1477
                                                String methodName = getMethods[i].getName();
 
1478
 
 
1479
                                                if (methodName.startsWith("get")
 
1480
                                                                && !methodsToSkipMap.containsKey(methodName)) {
1461
1481
                                                        Class[] parameterTypes = getMethods[i]
1462
1482
                                                                        .getParameterTypes();
1463
1483
 
1522
1542
                        }
1523
1543
                }
1524
1544
        }
 
1545
        
1525
1546
 
1526
1547
        /**
1527
1548
         * Tests fix for BUG#15544, no "dos" character set in MySQL > 4.1.0
1711
1732
                props.setProperty("autoReconnect", "false");
1712
1733
                props.setProperty("roundRobinLoadBalance", "true");
1713
1734
                props.setProperty("failoverReadOnly", "false");
1714
 
                props.setProperty("connectTimeout", "5000");
 
1735
                
 
1736
                if (!isRunningOnJdk131()) {
 
1737
                        props.setProperty("connectTimeout", "5000");
 
1738
                }
1715
1739
                
1716
1740
                // Re-build the connection information
1717
1741
                int firstIndexOfHost = BaseTestCase.dbUrl.indexOf("//") + 2;
1791
1815
                        }
1792
1816
                }
1793
1817
        }
 
1818
        
 
1819
        /**
 
1820
         * Tests to insure proper behavior for BUG#24706.
 
1821
         * 
 
1822
         * @throws Exception if the test fails.
 
1823
         */
 
1824
        public void testBug24706() throws Exception {
 
1825
                if (!versionMeetsMinimum(5, 0)) {
 
1826
                        return; // server status isn't there to support this feature
 
1827
                }
 
1828
                
 
1829
                Properties props = new Properties();
 
1830
                props.setProperty("elideSetAutoCommits", "true");
 
1831
                props.setProperty("logger", "StandardLogger");
 
1832
                props.setProperty("profileSQL", "true");
 
1833
                Connection c = null;
 
1834
                
 
1835
                StringBuffer logBuf = new StringBuffer();
 
1836
                
 
1837
                StandardLogger.bufferedLog = logBuf;
 
1838
                
 
1839
                try {
 
1840
                        c = getConnectionWithProps(props);
 
1841
                        c.setAutoCommit(true);
 
1842
                        c.createStatement().execute("SELECT 1");
 
1843
                        c.setAutoCommit(true);
 
1844
                        c.setAutoCommit(false);
 
1845
                        c.createStatement().execute("SELECT 1");
 
1846
                        c.setAutoCommit(false);
 
1847
                        
 
1848
                        // We should only see _one_ "set autocommit=" sent to the server
 
1849
                        
 
1850
                        String log = logBuf.toString();
 
1851
                        int searchFrom = 0;
 
1852
                        int count = 0;
 
1853
                        int found = 0;
 
1854
                        
 
1855
                        while ((found = log.indexOf("SET autocommit=", searchFrom)) != -1) {
 
1856
                                searchFrom =  found + 1;
 
1857
                                count++;
 
1858
                        }
 
1859
                        
 
1860
                        // The SELECT doesn't actually start a transaction, so being pedantic the
 
1861
                        // driver issues SET autocommit=0 again in this case.
 
1862
                        assertEquals(2, count);
 
1863
                } finally {
 
1864
                        StandardLogger.bufferedLog = null;
 
1865
                        
 
1866
                        if (c != null) {
 
1867
                                c.close();
 
1868
                        }
 
1869
                        
 
1870
                }
 
1871
        }
 
1872
        
 
1873
        /**
 
1874
         * Tests fix for BUG#25514 - Timer instance used for Statement.setQueryTimeout()
 
1875
         * created per-connection, rather than per-VM, causing memory leak.
 
1876
         * 
 
1877
         * @throws Exception if the test fails.
 
1878
         */
 
1879
        public void testBug25514() throws Exception {
 
1880
 
 
1881
                for (int i = 0; i < 10; i++) {
 
1882
                        getConnectionWithProps((Properties)null).close();
 
1883
                }
 
1884
                
 
1885
                ThreadGroup root = Thread.currentThread().getThreadGroup().getParent();
 
1886
 
 
1887
                while (root.getParent() != null) {
 
1888
                root = root.getParent();
 
1889
            }
 
1890
 
 
1891
                int numThreadsNamedTimer = findNamedThreadCount(root, "Timer");
 
1892
 
 
1893
                if (numThreadsNamedTimer == 0) {
 
1894
                        numThreadsNamedTimer = findNamedThreadCount(root, "MySQL Statement Cancellation Timer");
 
1895
                }
 
1896
                
 
1897
                // Notice that this seems impossible to test on JDKs prior to 1.5, as there is no
 
1898
                // reliable way to find the TimerThread, so we have to rely on new JDKs for this 
 
1899
                // test.
 
1900
                assertTrue("More than one timer for cancel was created", numThreadsNamedTimer <= 1);
 
1901
        }
 
1902
        
 
1903
        private int findNamedThreadCount(ThreadGroup group, String nameStart) {
 
1904
                
 
1905
                int count = 0;
 
1906
                
 
1907
        int numThreads = group.activeCount();
 
1908
        Thread[] threads = new Thread[numThreads*2];
 
1909
        numThreads = group.enumerate(threads, false);
 
1910
    
 
1911
        for (int i=0; i<numThreads; i++) {
 
1912
            if (threads[i].getName().startsWith(nameStart)) {
 
1913
                count++;
 
1914
            }
 
1915
        }
 
1916
 
 
1917
        int numGroups = group.activeGroupCount();
 
1918
        ThreadGroup[] groups = new ThreadGroup[numGroups*2];
 
1919
        numGroups = group.enumerate(groups, false);
 
1920
    
 
1921
        for (int i=0; i<numGroups; i++) {
 
1922
                count += findNamedThreadCount(groups[i], nameStart);
 
1923
        }
 
1924
 
 
1925
        return count;
 
1926
        }
 
1927
        
 
1928
        /**
 
1929
         * Ensures that we don't miss getters/setters for driver properties in
 
1930
         * ConnectionProperties so that names given in documentation work with 
 
1931
         * DataSources which will use JavaBean-style names and reflection to 
 
1932
         * set the values (and often fail silently! when the method isn't available).
 
1933
         * 
 
1934
         * @throws Exception
 
1935
         */
 
1936
        public void testBug23626() throws Exception {
 
1937
                Class clazz = this.conn.getClass();
 
1938
                
 
1939
                DriverPropertyInfo[] dpi = new NonRegisteringDriver().getPropertyInfo(dbUrl, null);
 
1940
                StringBuffer missingSettersBuf = new StringBuffer();
 
1941
                StringBuffer missingGettersBuf = new StringBuffer();
 
1942
                
 
1943
                Class[][] argTypes = {new Class[] { String.class }, new Class[] {Integer.TYPE}, new Class[] {Long.TYPE}, new Class[] {Boolean.TYPE}};
 
1944
                
 
1945
                for (int i = 0; i < dpi.length; i++) {
 
1946
                        
 
1947
                        String propertyName = dpi[i].name;
 
1948
                
 
1949
                        if (propertyName.equals("HOST") || propertyName.equals("PORT") 
 
1950
                                        || propertyName.equals("DBNAME") || propertyName.equals("user") ||
 
1951
                                        propertyName.equals("password")) {
 
1952
                                continue;
 
1953
                        }
 
1954
                                        
 
1955
                        StringBuffer mutatorName = new StringBuffer("set");
 
1956
                        mutatorName.append(Character.toUpperCase(propertyName.charAt(0)));
 
1957
                        mutatorName.append(propertyName.substring(1));
 
1958
                                
 
1959
                        StringBuffer accessorName = new StringBuffer("get");
 
1960
                        accessorName.append(Character.toUpperCase(propertyName.charAt(0)));
 
1961
                        accessorName.append(propertyName.substring(1));
 
1962
                        
 
1963
                        try {
 
1964
                                clazz.getMethod(accessorName.toString(), null);
 
1965
                        } catch (NoSuchMethodException nsme) {
 
1966
                                missingGettersBuf.append(accessorName.toString());
 
1967
                                missingGettersBuf.append("\n");
 
1968
                        }
 
1969
                        
 
1970
                        boolean foundMethod = false;
 
1971
                        
 
1972
                        for (int j = 0; j < argTypes.length; j++) {
 
1973
                                try {
 
1974
                                        clazz.getMethod(mutatorName.toString(), argTypes[j]);
 
1975
                                        foundMethod = true;
 
1976
                                        break;
 
1977
                                } catch (NoSuchMethodException nsme) {
 
1978
                                        
 
1979
                                }
 
1980
                        }
 
1981
                        
 
1982
                        if (!foundMethod) {
 
1983
                                missingSettersBuf.append(mutatorName);
 
1984
                                missingSettersBuf.append("\n");
 
1985
                        }
 
1986
                }
 
1987
                
 
1988
                assertEquals("Missing setters for listed configuration properties.", "", missingSettersBuf.toString());
 
1989
                assertEquals("Missing getters for listed configuration properties.", "", missingSettersBuf.toString());
 
1990
        }
 
1991
        
 
1992
        /**
 
1993
         * Tests fix for BUG#25545 - Client flags not sent correctly during handshake
 
1994
         * when using SSL.
 
1995
         * 
 
1996
         * Requires test certificates from testsuite/ssl-test-certs to be installed
 
1997
         * on the server being tested.
 
1998
         * 
 
1999
         * @throws Exception if the test fails.
 
2000
         */
 
2001
        public void testBug25545() throws Exception {
 
2002
                if (!versionMeetsMinimum(5, 0)) {
 
2003
                        return;
 
2004
                }
 
2005
                
 
2006
                if (isRunningOnJdk131()) {
 
2007
                        return;
 
2008
                }
 
2009
        
 
2010
                createProcedure("testBug25545", "() BEGIN SELECT 1; END");
 
2011
                
 
2012
                String trustStorePath = "src/testsuite/ssl-test-certs/test-cert-store";
 
2013
                
 
2014
                System.setProperty("javax.net.ssl.keyStore", trustStorePath);
 
2015
                System.setProperty("javax.net.ssl.keyStorePassword","password");
 
2016
                System.setProperty("javax.net.ssl.trustStore", trustStorePath);
 
2017
                System.setProperty("javax.net.ssl.trustStorePassword","password");
 
2018
                
 
2019
                
 
2020
                Connection sslConn = null;
 
2021
                
 
2022
                try {
 
2023
                        Properties props = new Properties();
 
2024
                        props.setProperty("useSSL", "true");
 
2025
                        props.setProperty("requireSSL", "true");
 
2026
                        
 
2027
                        sslConn = getConnectionWithProps(props);
 
2028
                        sslConn.prepareCall("{ call testBug25545()}").execute();
 
2029
                } finally {
 
2030
                        if (sslConn != null) {
 
2031
                                sslConn.close();
 
2032
                        }
 
2033
                }
 
2034
        }
 
2035
        
 
2036
        /**
 
2037
         * Tests fix for BUG#27655 - getTransactionIsolation() uses
 
2038
         * "SHOW VARIABLES LIKE" which is very inefficient on MySQL-5.0+
 
2039
         * 
 
2040
         * @throws Exception
 
2041
         */
 
2042
        public void testBug27655() throws Exception {
 
2043
                StringBuffer logBuf = new StringBuffer();
 
2044
                Properties props = new Properties();
 
2045
                props.setProperty("profileSQL", "true");
 
2046
                props.setProperty("logger", "StandardLogger");
 
2047
                StandardLogger.bufferedLog = logBuf;
 
2048
                
 
2049
                Connection loggedConn = null;
 
2050
                
 
2051
                try {
 
2052
                        loggedConn = getConnectionWithProps(props);
 
2053
                        loggedConn.getTransactionIsolation();
 
2054
                        
 
2055
                        if (versionMeetsMinimum(4, 0, 3)) {
 
2056
                                assertEquals(-1, logBuf.toString().indexOf("SHOW VARIABLES LIKE 'tx_isolation'"));
 
2057
                        }
 
2058
                } finally {
 
2059
                        if (loggedConn != null) {
 
2060
                                loggedConn.close();
 
2061
                        }
 
2062
                }
 
2063
        }
 
2064
        
 
2065
        /**
 
2066
         * Tests fix for issue where a failed-over connection would let
 
2067
         * an application call setReadOnly(false), when that call 
 
2068
         * should be ignored until the connection is reconnected to a 
 
2069
         * writable master.
 
2070
         * 
 
2071
         * @throws Exception if the test fails.
 
2072
         */
 
2073
        public void testFailoverReadOnly() throws Exception {
 
2074
                Properties props = getMasterSlaveProps();
 
2075
                props.setProperty("autoReconnect", "true");
 
2076
        
 
2077
                Connection failoverConn = null;
 
2078
 
 
2079
                Statement failoverStmt = 
 
2080
                        null;
 
2081
                
 
2082
                try {
 
2083
                        failoverConn = getConnectionWithProps(getMasterSlaveUrl(), props);
 
2084
                        
 
2085
                        ((com.mysql.jdbc.Connection)failoverConn).setPreferSlaveDuringFailover(true);
 
2086
                        
 
2087
                        failoverStmt = failoverConn.createStatement();
 
2088
                        
 
2089
                        String masterConnectionId = getSingleIndexedValueWithQuery(failoverConn, 1, "SELECT connection_id()").toString();
 
2090
                        
 
2091
                        this.stmt.execute("KILL " + masterConnectionId);
 
2092
                        
 
2093
                        // die trying, so we get the next host
 
2094
                        for (int i = 0; i < 100; i++) {
 
2095
                                try {
 
2096
                                        failoverStmt.executeQuery("SELECT 1");
 
2097
                                } catch (SQLException sqlEx) {
 
2098
                                        break;
 
2099
                                }
 
2100
                        }
 
2101
                        
 
2102
                        String slaveConnectionId = getSingleIndexedValueWithQuery(failoverConn, 1, "SELECT connection_id()").toString();
 
2103
                        
 
2104
                        assertTrue("Didn't get a new physical connection",
 
2105
                                        !masterConnectionId.equals(slaveConnectionId));
 
2106
                        
 
2107
                        failoverConn.setReadOnly(false); // this should be ignored
 
2108
                        
 
2109
                        assertTrue(failoverConn.isReadOnly());
 
2110
                        
 
2111
                        ((com.mysql.jdbc.Connection)failoverConn).setPreferSlaveDuringFailover(false);
 
2112
                        
 
2113
                        this.stmt.execute("KILL " + slaveConnectionId); // we can't issue this on our own connection :p
 
2114
                        
 
2115
                        // die trying, so we get the next host
 
2116
                        for (int i = 0; i < 100; i++) {
 
2117
                                try {
 
2118
                                        failoverStmt.executeQuery("SELECT 1");
 
2119
                                } catch (SQLException sqlEx) {
 
2120
                                        break;
 
2121
                                }
 
2122
                        }
 
2123
                        
 
2124
                        String newMasterId = getSingleIndexedValueWithQuery(failoverConn, 1, "SELECT connection_id()").toString();
 
2125
                        
 
2126
                        assertTrue("Didn't get a new physical connection",
 
2127
                                        !slaveConnectionId.equals(newMasterId));
 
2128
                        
 
2129
                        failoverConn.setReadOnly(false);
 
2130
                        
 
2131
                        assertTrue(!failoverConn.isReadOnly());
 
2132
                } finally {
 
2133
                        if (failoverStmt != null) {
 
2134
                                failoverStmt.close();
 
2135
                        }
 
2136
                        
 
2137
                        if (failoverConn != null) {
 
2138
                                failoverConn.close();
 
2139
                        }
 
2140
                }
 
2141
        }
 
2142
        
 
2143
        public void testPropertiesDescriptionsKeys() throws Exception {
 
2144
                DriverPropertyInfo[] dpi = new NonRegisteringDriver().getPropertyInfo(
 
2145
                                dbUrl, null);
 
2146
 
 
2147
                for (int i = 0; i < dpi.length; i++) {
 
2148
                        String description = dpi[i].description;
 
2149
                        String propertyName = dpi[i].name;
 
2150
 
 
2151
                        if (description.indexOf("Missing error message for key '") != -1
 
2152
                                        || description.startsWith("!")) {
 
2153
                                fail("Missing message for configuration property "
 
2154
                                                + propertyName);
 
2155
                        }
 
2156
 
 
2157
                        if (description.length() < 10) {
 
2158
                                fail("Suspiciously short description for configuration property "
 
2159
                                                + propertyName);
 
2160
                        }
 
2161
                }
 
2162
        }
 
2163
        
 
2164
        public void testBug29852() throws Exception {
 
2165
        Connection lbConn = getLoadBalancedConnection();
 
2166
        assertTrue(!lbConn.getClass().getName().startsWith("com.mysql.jdbc"));
 
2167
        lbConn.close();
 
2168
    }
 
2169
 
 
2170
        private Connection getLoadBalancedConnection() throws SQLException {
 
2171
                int indexOfHostStart = dbUrl.indexOf("://") + 3;
 
2172
        int indexOfHostEnd = dbUrl.indexOf("/", indexOfHostStart);
 
2173
        
 
2174
        String backHalf = dbUrl.substring(indexOfHostStart, indexOfHostEnd);
 
2175
        
 
2176
        if (backHalf.length() == 0) {
 
2177
                backHalf = "localhost:3306";
 
2178
        }
 
2179
        
 
2180
        String dbAndConfigs = dbUrl.substring(indexOfHostEnd);
 
2181
        
 
2182
        Connection lbConn = DriverManager.getConnection("jdbc:mysql:loadbalance://" + backHalf + "," + backHalf + dbAndConfigs);
 
2183
                return lbConn;
 
2184
        }
 
2185
        
 
2186
        /**
 
2187
         * Test of a new feature to fix BUG 22643, specifying a
 
2188
         * "validation query" in your connection pool that starts
 
2189
         * with "slash-star ping slash-star" _exactly_ will cause the driver to " +
 
2190
         * instead send a ping to the server (much lighter weight), and when using
 
2191
         * a ReplicationConnection or a LoadBalancedConnection, will send
 
2192
         * the ping across all active connections.
 
2193
         * 
 
2194
         * @throws Exception
 
2195
         */
 
2196
        public void testBug22643() throws Exception {
 
2197
                checkPingQuery(this.conn);
 
2198
                
 
2199
                Connection replConnection = getMasterSlaveReplicationConnection();
 
2200
                
 
2201
                try {
 
2202
                        checkPingQuery(replConnection);
 
2203
                } finally {
 
2204
                        if (replConnection != null) {
 
2205
                                replConnection.close();
 
2206
                        }
 
2207
                }
 
2208
                
 
2209
                Connection lbConn = getLoadBalancedConnection();
 
2210
                
 
2211
                try {
 
2212
                        checkPingQuery(lbConn);
 
2213
                } finally {
 
2214
                        if (lbConn != null) {
 
2215
                                lbConn.close();
 
2216
                        }
 
2217
                }
 
2218
        }
 
2219
 
 
2220
        private void checkPingQuery(Connection c) throws SQLException {
 
2221
                // Yes, I know we're sending 2, and looking for 1
 
2222
                // that's part of the test, since we don't _really_
 
2223
                // send the query to the server!
 
2224
                String aPingQuery = "/* ping */ SELECT 2";
 
2225
                Statement pingStmt = c.createStatement();
 
2226
                PreparedStatement pingPStmt = null;
 
2227
                
 
2228
                try {
 
2229
                        this.rs = pingStmt.executeQuery(aPingQuery);
 
2230
                        assertTrue(this.rs.next());
 
2231
                        assertEquals(this.rs.getInt(1), 1);
 
2232
                        
 
2233
                        assertTrue(pingStmt.execute(aPingQuery));
 
2234
                        this.rs = pingStmt.getResultSet();
 
2235
                        assertTrue(this.rs.next());
 
2236
                        assertEquals(this.rs.getInt(1), 1);
 
2237
                        
 
2238
                        pingPStmt = c.prepareStatement(aPingQuery);
 
2239
                        
 
2240
                        assertTrue(pingPStmt.execute());
 
2241
                        this.rs = pingPStmt.getResultSet();
 
2242
                        assertTrue(this.rs.next());
 
2243
                        assertEquals(this.rs.getInt(1), 1);
 
2244
                        
 
2245
                        this.rs = pingPStmt.executeQuery();
 
2246
                        assertTrue(this.rs.next());
 
2247
                        assertEquals(this.rs.getInt(1), 1);
 
2248
                } finally {
 
2249
                        closeMemberJDBCResources();
 
2250
                }
 
2251
        }
1794
2252
}