db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3587) Convert jdbcapi/testRelative.java to JUnit
Date Wed, 07 May 2008 18:36:56 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594994#action_12594994
] 

Kathey Marsden commented on DERBY-3587:
---------------------------------------

I just noticed in the test that we are missing fail lines if an expected failure executes.
For example we have:

try {
			/*
			 * Attempting to move beyond the first/last row in the result set
			 * positions the cursor before/after the the first/last row.
			 * Therefore, attempting to get value will throw an exception.
			 */
			rs.getString("name");
		} catch (SQLException sqle) {
			/**
			 * sets the expected sql state for the expected exceptions,
			 * according to return value of usingDerbyNetClient().
			 */
			String NO_CURRENT_ROW_SQL_STATE = "";
			if (usingDerbyNetClient()) {
				NO_CURRENT_ROW_SQL_STATE = "XJ121";
			} else {
				NO_CURRENT_ROW_SQL_STATE = "24000";
			}
			assertSQLState(NO_CURRENT_ROW_SQL_STATE, sqle);
		}

There should be a fail call after rs.getString so that we get a failure if the statement executes.
 Could you submit a followup patch?



> Convert jdbcapi/testRelative.java to JUnit
> ------------------------------------------
>
>                 Key: DERBY-3587
>                 URL: https://issues.apache.org/jira/browse/DERBY-3587
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Suran Jayathilaka
>            Assignee: Suran Jayathilaka
>            Priority: Minor
>         Attachments: jdbcapi-testRelative-converted-2.diff, jdbcapi-testRelative-converted-3.diff,
jdbcapi-testRelative-converted.diff
>
>
> Convert jdbcapi/testRelative.java from the old testHarness to JUnit.

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


Mime
View raw message