Thanks Ramin for looking at this test conversion. The main thing I think is that we really need to make sure that we are testing everything the old test tested. Below are some specific comments, but it would be good to do a close review comparing the old and new test to make sure that we have assertions for all of the cases that were tested by canon comparison before. Anyway, here are some comments ....
Typically the test class name for the junit tests starts with a capital letter. e.g. ParameterMetaDataJdbc30Test
parameterMetaDataJdbc30_app.properties and master/parameterMetaDataJdbc30.out should be deleted.
Attach the output of svn stat to your next patch.
When I run the test all the tests fail with
parameterMetaDataJdbc30Test)java.sql.SQLException: Schema 'SAMPLE' does not exist
This is I think because setUp attempts to drop the table that is not there.
I think you would be better off using CleanDatabaseSetup and the decorateSQL method to create your table and function, rather than creating it with each fixture. There are lots of examples of CleanDatabaseSetup usage in other tests.
The dumpExpectedSQLExceptions method only checks an SQLException's sqlstate against itself, so would always pass. Instead of calls to dumpExpectedSQLExceptions
you should have assertSQLState("XXXXX",e) where XXXX is the hardcoded expected SQLState. You can see the expected states by looking at the canon in functionTests/master/parameterMetaDataJdbc30.out or just temporarily printing SQLState to see what it is.
Calls like assertTrue ("Jira 44 failed.", "22019".equals(e.getSQLState()) can be replaced by assertSQLState
The System.out's in the old test need to be translated into assertions. e.g.
//System.out.println("parameters count for callable statement is: " + paramMetaData.getParameterCount());
should be replaced with an assertEquals call.
dumpParameterMetaDataNegative doesn't look quite right to me. It seems like it would always fail. Instead of
fail("parameter isNullable " + paramMetaData.isNullable(-1));
catch (SQLException e)
I would expect something like.
fail("parameterMetaData.isNullable(-1) should have failed);
catch (SQLException se)
For the code where we have if(!usingDerbyNetClient()) there should be an explanation of why we don't run with client with a Jira reference. If there is a bug and it is not filed, file one.
The fixtures testParameterMetadataWithXXXParameters () doesn't actually seem to test the parameterMetaData. I don't know if that is an artifact of the old test but we should add in some testing.