Mercurial > hg > monetdb-java
comparison tests/JDBC_API_Tester.java @ 943:ff075ed5ce81
Spell check.
author | Sjoerd Mullender <sjoerd@acm.org> |
---|---|
date | Thu, 09 Jan 2025 10:56:14 +0100 (3 months ago) |
parents | 64ea9d5fbf87 |
children | 9c310d692465 |
comparison
equal
deleted
inserted
replaced
942:45c26b1a0677 | 943:ff075ed5ce81 |
---|---|
3166 } | 3166 } |
3167 | 3167 |
3168 private void Test_PStimezone() { | 3168 private void Test_PStimezone() { |
3169 sb.setLength(0); // clear the output log buffer | 3169 sb.setLength(0); // clear the output log buffer |
3170 | 3170 |
3171 // make sure this test is reproducable regardless timezone | 3171 // make sure this test is reproducible regardless timezone |
3172 // setting, by overriding the VM's default | 3172 // setting, by overriding the VM's default |
3173 // we have to make sure that one doesn't have daylight | 3173 // we have to make sure that one doesn't have daylight |
3174 // savings corrections | 3174 // savings corrections |
3175 TimeZone.setDefault(TimeZone.getTimeZone("UTC")); | 3175 TimeZone.setDefault(TimeZone.getTimeZone("UTC")); |
3176 | 3176 |
4825 sb.append("0. true\t").append(con.getAutoCommit()).append("\n"); | 4825 sb.append("0. true\t").append(con.getAutoCommit()).append("\n"); |
4826 | 4826 |
4827 stmt = con.createStatement(); | 4827 stmt = con.createStatement(); |
4828 sb.append("1. more results?..."); | 4828 sb.append("1. more results?..."); |
4829 if (stmt.getMoreResults() != false || stmt.getUpdateCount() != -1) | 4829 if (stmt.getMoreResults() != false || stmt.getUpdateCount() != -1) |
4830 sb.append("more results on an unitialised Statement, how can that be?\n"); | 4830 sb.append("more results on an uninitialized Statement, how can that be?\n"); |
4831 sb.append(" nope :)\n"); | 4831 sb.append(" nope :)\n"); |
4832 | 4832 |
4833 sb.append("2. SELECT 1..."); | 4833 sb.append("2. SELECT 1..."); |
4834 if (stmt.execute("SELECT 1;") == false) | 4834 if (stmt.execute("SELECT 1;") == false) |
4835 sb.append("SELECT 1 returns update or no results\n"); | 4835 sb.append("SELECT 1 returns update or no results\n"); |
6721 } | 6721 } |
6722 | 6722 |
6723 private void testTimeout_3357(Statement st, int secs) throws SQLException { | 6723 private void testTimeout_3357(Statement st, int secs) throws SQLException { |
6724 sb.append("setQueryTimeout = ").append(secs).append(". "); | 6724 sb.append("setQueryTimeout = ").append(secs).append(". "); |
6725 st.setQueryTimeout(secs); | 6725 st.setQueryTimeout(secs); |
6726 // as the call to set the timeout is delayed till a statement is executed, issue a select statment | 6726 // as the call to set the timeout is delayed till a statement is executed, issue a select statement |
6727 ResultSet rs = st.executeQuery("SELECT " + secs); | 6727 ResultSet rs = st.executeQuery("SELECT " + secs); |
6728 if (rs != null) | 6728 if (rs != null) |
6729 rs.close(); | 6729 rs.close(); |
6730 sb.append("getQueryTimeout = ").append(st.getQueryTimeout()).append("\n"); | 6730 sb.append("getQueryTimeout = ").append(st.getQueryTimeout()).append("\n"); |
6731 } | 6731 } |