db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-4665) Unidiomatic error handling in TimestampArithTest
Date Wed, 19 May 2010 08:13:54 GMT
Unidiomatic error handling in TimestampArithTest

                 Key: DERBY-4665
                 URL: https://issues.apache.org/jira/browse/DERBY-4665
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions:
            Reporter: Knut Anders Hatlen
            Assignee: Knut Anders Hatlen

TimestampArithTest contains some error handling code that prevents the underlying error from
being reported to the JUnit framework, and it may even terminate the JVM running the tests
on some errors. Examples:

This code prints the stack trace of the underlying error to the terminal, but it won't be
included in the report from the JUnit framework:

					fail("Unexpected exception from statement '" + sql + "'");

This code terminates the JVM on error, preventing subsequent tests from running, and also
preventing the JUnit framework to report the results from the tests that did run:

		} catch (Exception e) {
			System.out.println(s + " is not a proper timestamp string.");
			System.out.println(e.getClass().getName() + ": " + e.getMessage());
			return null;

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message