Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1F7321020E for ; Tue, 25 Feb 2014 02:02:41 +0000 (UTC) Received: (qmail 91927 invoked by uid 500); 25 Feb 2014 02:02:40 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 91863 invoked by uid 500); 25 Feb 2014 02:02:40 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 91799 invoked by uid 99); 25 Feb 2014 02:02:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Feb 2014 02:02:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Feb 2014 02:02:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EA99023889BF; Tue, 25 Feb 2014 02:02:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1571534 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java Date: Tue, 25 Feb 2014 02:02:15 -0000 To: derby-commits@db.apache.org From: myrnavl@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140225020215.EA99023889BF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: myrnavl Date: Tue Feb 25 02:02:15 2014 New Revision: 1571534 URL: http://svn.apache.org/r1571534 Log: DERBY-6280; test failure in SetQueryTimeoutTest ComparisonFailure: Output at line 16 expected: but was: adding details to the failure messages for this case Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java?rev=1571534&r1=1571533&r2=1571534&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetQueryTimeoutTest.java Tue Feb 25 02:02:15 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();