You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by mi...@apache.org on 2006/08/26 00:10:09 UTC
svn commit: r436977 - in
/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests:
master/SetQueryTimeoutTest.out tests/jdbcapi/SetQueryTimeoutTest.java
Author: mikem
Date: Fri Aug 25 15:10:08 2006
New Revision: 436977
URL: http://svn.apache.org/viewvc?rev=436977&view=rev
Log:
DERBY-1698
backported 436904 from trunk to branch:
DERBY-1698, contributed by Deepa Remesh
adds an additional test to jdbcapi/SetQueryTimeoutTest.java. This patch adds a
test for executeUpdate method call.
Modified:
db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/SetQueryTimeoutTest.out
db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java
Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/SetQueryTimeoutTest.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/SetQueryTimeoutTest.out?rev=436977&r1=436976&r2=436977&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/SetQueryTimeoutTest.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/SetQueryTimeoutTest.out Fri Aug 25 15:10:08 2006
@@ -15,5 +15,6 @@
Testing that Statement remembers timeout.
Testing that PreparedStatement remembers timeout.
Testing that CallableStatement remembers timeout.
+Testing timeout with executeUpdate call.
Test SetQueryTimeoutTest PASSED
Closed connections
Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java?rev=436977&r1=436976&r2=436977&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java Fri Aug 25 15:10:08 2006
@@ -645,6 +645,20 @@
}
}
+ /** This tests timeout with executeUpdate call. */
+ private static void testTimeoutWithExecuteUpdate(Connection conn)
+ throws TestFailedException
+ {
+ System.out.println("Testing timeout with executeUpdate call.");
+ try{
+ Statement stmt = conn.createStatement();
+ stmt.setQueryTimeout(TIMEOUT);
+ stmt.executeUpdate(getExecQuery("t"));
+ } catch (SQLException sqle) {
+ expectException("XCL52", sqle, "Should have timed out.");
+ }
+ }
+
/** Test for DERBY-1692. */
private static void testRememberTimeoutValue(Connection conn)
throws TestFailedException
@@ -744,6 +758,7 @@
testTimeoutWithExec(connections);
testInvalidTimeoutValue(connections[0]);
testRememberTimeoutValue(connections[0]);
+ testTimeoutWithExecuteUpdate(connections[0]);
System.out.println("Test SetQueryTimeoutTest PASSED");
} catch (Throwable e) {