[ 
https://issues.apache.org/jira/browse/DERBY-2398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean T. Anderson updated DERBY-2398:
------------------------------------

    Attachment: patch-2398.diff

Patch derby-2398.diff implements all tests. I'll wait for a day or two to give 
anyone who has time/inclination to review it (and many thanks in advance).

Three specific questions/notes are below.

1) The original autoGeneratedJdbc30_app.properties file has this setting:

   runwithj9=false

Does returning a empty suite if (!JDBC.vmSupportsJDBC3()) do what's needed for 
j9?  Or should I do something special?

2) I posted to derby-dev* asking if getGeneratedKeys() should return a NULL key 
after commit/rollback. Depending on that answer, I'll open a Jira issue if one 
is needed and update comments for the relevant methods in the code.

* 
http://www.nabble.com/Should-getGeneratedKeys%28%29-return-a-NULL-key-after-commit-rollback--p9505841.html

3) The testResultSetGarbageCollection() method is noticeably slow (Test 20 in
the old code).

The purpose of the test was to verify a fix for an old issue in which the 
ResultSet returned by getGenerateKeys() was incorrectly tied to the activation 
of the PreparedStatement. So, when the ResultSet was garbage collected, the 
activation was closed, resulting in an "Activation closed, operation execute 
not permitted" exception on subsequent executes.

So, the test does this:
        for (int i = 0; i < 100; i++)
        {
            ps.setInt(1, 100+i);
            ps.executeUpdate();

            ResultSet rs = ps.getGeneratedKeys();
            while (rs.next()) {
               rs.getInt(1);
            }
            rs.close();
            conn.commit();

            System.runFinalization();
            System.gc();
            System.runFinalization();
            System.gc();
        }

I wonder if this is overkill. Could it be nipped back without degrading the 
effectiveness of the test?

> Convert jdbcapi/autoGeneratedJdbc30.java to junit
> -------------------------------------------------
>
>                 Key: DERBY-2398
>                 URL: https://issues.apache.org/jira/browse/DERBY-2398
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Jean T. Anderson
>         Assigned To: Jean T. Anderson
>            Priority: Minor
>         Attachments: derby-2398-pre.diff, patch-2398.diff, 
> test_file_ignore_me.txt
>
>
> Convert the jdbcapi/autoGeneratedJdbc30.java test from the old harness to 
> junit.

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

Reply via email to