db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2458) Convert lang/unaryArithmeticDynamicParamter.java to junit
Date Mon, 19 Mar 2007 15:55:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12482129

Daniel John Debrunner commented on DERBY-2458:

Patch doesn't compile for me,
    [javac] C:\_work\svn_clean4\trunk\java\testing\org\apache\derbyTesting\funct
ionTests\tests\lang\UnaryArithmeticParameterTest.java:262: assertColumnTypes(jav
a.sql.ResultSet,int[]) in org.apache.derbyTesting.junit.JDBC cannot be applied t
o (java.sql.PreparedStatement,int[])
    [javac]                     JDBC.assertColumnTypes(ps,expectedTypes);
    [javac]                             ^

Seems like some other changes are missing.

The comments don't indicate why this test requires JDBC 3? I couldn't see anything obvious
that would stop this running on JSR169.

FYI  - a single patch file is much more convienent, than a separate one for the change to
the suite file.

For code like this:
+			Object[][] expectedRows = new Object[][]{{new String("-2"),new String("2")},{new String("-2"),new
+			JDBC.assertFullResultSet(ps.executeQuery(), expectedRows, true);

it can be cleaned up a couple of ways:
   - new String("-2") is kind of pointless, "-2" is a String object, just it can be used directly.
   - a utility assertFullResultSet method exists that takes strings, so the code could be:

 +			String[][] expectedRows = new String[][]{{"-2", "2"},{-2","2"}};
+			JDBC.assertFullResultSet(ps.executeQuery(), expectedRows);

It looks like the suite method runs the fixtures twice in embedded, once adding them directly
and once through defaultSuite

> Convert lang/unaryArithmeticDynamicParamter.java to junit
> ---------------------------------------------------------
>                 Key: DERBY-2458
>                 URL: https://issues.apache.org/jira/browse/DERBY-2458
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions:
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Trivial
>             Fix For:
>         Attachments: DERBY-2458_diff_03_16.txt, DERBY-2458_diff_03_16_ver2.txt, DERBY-2458_diff_ver1.txt,
> Place holder to convert lang/unaryArithmeticDynamicParameter.java to junit

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

View raw message