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 my...@apache.org on 2014/02/25 03:06:26 UTC
svn commit: r1571538 - in /db/derby/code/branches/10.10: ./
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java
Author: myrnavl
Date: Tue Feb 25 02:06:25 2014
New Revision: 1571538
URL: http://svn.apache.org/r1571538
Log:
DERBY-6280; test failure in SetQueryTimeoutTest ComparisonFailure: Output at line 16 expected:<Test[ing that PreparedStatement remembers timeout.]> but was:<Test[ SetQueryTimeoutTest FAILED]>
adding comments; merge of revision 1571534 from trunk
Modified:
db/derby/code/branches/10.10/ (props changed)
db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java
Propchange: db/derby/code/branches/10.10/
------------------------------------------------------------------------------
Merged /db/derby/code/trunk:r1571534
Modified: db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java?rev=1571538&r1=1571537&r2=1571538&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java (original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java Tue Feb 25 02:06:25 2014
@@ -681,13 +681,20 @@ public class SetQueryTimeoutTest
{
System.out.println("Testing that Statement remembers timeout.");
stmt.setQueryTimeout(1);
+ long runTime=0;
for (int i = 0; i < 3; i++) {
try {
ResultSet rs = stmt.executeQuery(getFetchQuery("t"));
+ long startTime = System.currentTimeMillis();
while (rs.next());
- throw new TestFailedException("Should have timed out.");
+ long endTime = System.currentTimeMillis();
+ runTime = endTime - startTime;
+ throw new TestFailedException("Should have timed out, for " +
+ "statement, iteration: " +i+ ", took (millis): "+runTime);
} catch (SQLException sqle) {
- expectException("XCL52", sqle, "Should have timed out.");
+ expectException("XCL52", sqle, "Should have timed out, got " +
+ "unexpected exception, for statement, iteration: " + i +
+ ", time taken (millis): " + runTime);
}
}
stmt.close();
@@ -703,12 +710,20 @@ public class SetQueryTimeoutTest
System.out.println("Testing that " + name + " remembers timeout.");
ps.setQueryTimeout(1);
for (int i = 0; i < 3; i++) {
+ long runTime=0;
try {
ResultSet rs = ps.executeQuery();
+ long startTime = System.currentTimeMillis();
while (rs.next());
- throw new TestFailedException("Should have timed out.");
+ long endTime = System.currentTimeMillis();
+ runTime = endTime - startTime;
+ throw new TestFailedException(
+ "Should have timed out, for " + name + ", on iteration "
+ + i + ", runtime(millis): " + runTime);
} catch (SQLException sqle) {
- expectException("XCL52", sqle, "Should have timed out.");
+ expectException("XCL52", sqle, "Should have timed out, " +
+ "got unexpected exception, for " + name + ", on iteration "
+ + i + ", runtime(millis): " + runTime);
}
}
ps.close();