You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org> on 2006/09/28 08:52:50 UTC

[jira] Created: (DERBY-1895) Convert jdbcapi/blobclob4BLOB.java to Junit

Convert jdbcapi/blobclob4BLOB.java to Junit
-------------------------------------------

                 Key: DERBY-1895
                 URL: http://issues.apache.org/jira/browse/DERBY-1895
             Project: Derby
          Issue Type: Sub-task
            Reporter: Fernanda Pizzorno
         Assigned To: Fernanda Pizzorno




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1895) Convert jdbcapi/blobclob4BLOB.java to Junit

Posted by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1895?page=all ]

Fernanda Pizzorno updated DERBY-1895:
-------------------------------------

    Derby Info: [Patch Available]

> Convert jdbcapi/blobclob4BLOB.java to Junit
> -------------------------------------------
>
>                 Key: DERBY-1895
>                 URL: http://issues.apache.org/jira/browse/DERBY-1895
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Fernanda Pizzorno
>         Assigned To: Fernanda Pizzorno
>         Attachments: derby-1895.diff, derby-1895.html, derby-1895.stat
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1895) Convert jdbcapi/blobclob4BLOB.java to Junit

Posted by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1895?page=comments#action_12443253 ] 
            
Fernanda Pizzorno commented on DERBY-1895:
------------------------------------------

I am also not sure what testClobFinalizer and testBlobFinalizer test. I left them as they were because there was a note saying that they are included in the test run to exercise the code even though the didn't produce any output.

Knut Anders wrote:

[...]
- I'm not sure I understand what testClobFinalizer and testBlobFinalizer test. Is their only purpose to force the finalizers to run? If so, would it make sense to add System.runFinalization() after System.gc(). 
[...]

> Convert jdbcapi/blobclob4BLOB.java to Junit
> -------------------------------------------
>
>                 Key: DERBY-1895
>                 URL: http://issues.apache.org/jira/browse/DERBY-1895
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Fernanda Pizzorno
>         Assigned To: Fernanda Pizzorno
>         Attachments: derby-1895.diff, derby-1895.html, derby-1895.stat, derby-1895v2.diff, derby-1895v2.stat
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1895) Convert jdbcapi/blobclob4BLOB.java to Junit

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1895?page=comments#action_12443281 ] 
            
Dyre Tjeldvoll commented on DERBY-1895:
---------------------------------------

I have run the test successfully, both as part of  jdbcapi._Suite and as part of suites.All. So unless the test(C|B)lobFinalizer are considered blockers, I think it would good to commit this patch.

> Convert jdbcapi/blobclob4BLOB.java to Junit
> -------------------------------------------
>
>                 Key: DERBY-1895
>                 URL: http://issues.apache.org/jira/browse/DERBY-1895
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Fernanda Pizzorno
>         Assigned To: Fernanda Pizzorno
>         Attachments: derby-1895.diff, derby-1895.html, derby-1895.stat, derby-1895v2.diff, derby-1895v2.stat
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1895) Convert jdbcapi/blobclob4BLOB.java to Junit

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1895?page=comments#action_12442521 ] 
            
Knut Anders Hatlen commented on DERBY-1895:
-------------------------------------------

Hi Fernanda. Thank you for rewriting the test! I had a quick look at your patch and the description of it. A couple of question/comments:

- Some of the test cases (testSetClobToIntColumn, testSetClobToIntColumn, testSetClobToIntColumn) have comments saying "need to run prepareCLOBMAIN first", but there is no such method.

- I'm not sure I understand what testClobFinalizer and testBlobFinalizer test. Is their only purpose to force the finalizers to run? If so, would it make sense to add System.runFinalization() after System.gc().

- The testPosition* cases use random start position and length. If these tests fail, it could be hard to reproduce because we don't know the actual values. Could the start position and length be part of the error message? (I saw the println() statements, but they only print the information when the verbose flag is true.)

- runPositionStringTest() has a workaround for DERBY-1917. When the test has been committed, a comment should be added to 1917 that the test should be cleaned up when it has been fixed.

- The suite() method adds each test case manually. I think it would be better to use the built-in JUnit functionality for adding all test* methods and only add those test cases that don't run under DerbyNet manually. That would make it easier to add more test cases later, and it would be more consistent with the other JUnit tests.

- Minor nit: many calls to assertTrue("XXX", false) would be easier to read if written as fail("XXX").

- I found many constructions similar to this:

+        try {
+            clob.length();
+            if (usingEmbedded()) {
+                assertTrue("FAIL - should not be able to access large log " +
+                        "after commit", false);
+            }
+        } catch (SQLException e) {
+            checkException(BLOB_ACCESSED_AFTER_COMMIT, e);
+        }

  If I understand these constructions correctly, they expect embedded to fail with a given SQLState, but the network client and JCC should succeed. But under DerbyNet and DerbyNetClient, these test cases will succeed both when the call succeeds and when the call fails with the given SQLState. Is this how it was intended?

> Convert jdbcapi/blobclob4BLOB.java to Junit
> -------------------------------------------
>
>                 Key: DERBY-1895
>                 URL: http://issues.apache.org/jira/browse/DERBY-1895
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Fernanda Pizzorno
>         Assigned To: Fernanda Pizzorno
>         Attachments: derby-1895.diff, derby-1895.html, derby-1895.stat
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-1895) Convert jdbcapi/blobclob4BLOB.java to Junit

Posted by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1895?page=all ]

Fernanda Pizzorno closed DERBY-1895.
------------------------------------


> Convert jdbcapi/blobclob4BLOB.java to Junit
> -------------------------------------------
>
>                 Key: DERBY-1895
>                 URL: http://issues.apache.org/jira/browse/DERBY-1895
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Fernanda Pizzorno
>         Assigned To: Fernanda Pizzorno
>             Fix For: 10.3.0.0
>
>         Attachments: derby-1895.diff, derby-1895.html, derby-1895.stat, derby-1895v2.diff, derby-1895v2.stat
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DERBY-1895) Convert jdbcapi/blobclob4BLOB.java to Junit

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1895?page=all ]

Knut Anders Hatlen resolved DERBY-1895.
---------------------------------------

    Fix Version/s: 10.3.0.0
       Resolution: Fixed
       Derby Info:   (was: [Patch Available])

Thanks Fernanda. Committed revision 465601.

> Convert jdbcapi/blobclob4BLOB.java to Junit
> -------------------------------------------
>
>                 Key: DERBY-1895
>                 URL: http://issues.apache.org/jira/browse/DERBY-1895
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Fernanda Pizzorno
>         Assigned To: Fernanda Pizzorno
>             Fix For: 10.3.0.0
>
>         Attachments: derby-1895.diff, derby-1895.html, derby-1895.stat, derby-1895v2.diff, derby-1895v2.stat
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1895) Convert jdbcapi/blobclob4BLOB.java to Junit

Posted by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1895?page=all ]

Fernanda Pizzorno updated DERBY-1895:
-------------------------------------

    Attachment: derby-1895v2.diff
                derby-1895v2.stat

Knut Anders' comments are addressed in the attached patch (derby-1895v2.diff). I have succesfully run org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite with this patch. Can someone please review it?

> Convert jdbcapi/blobclob4BLOB.java to Junit
> -------------------------------------------
>
>                 Key: DERBY-1895
>                 URL: http://issues.apache.org/jira/browse/DERBY-1895
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Fernanda Pizzorno
>         Assigned To: Fernanda Pizzorno
>         Attachments: derby-1895.diff, derby-1895.html, derby-1895.stat, derby-1895v2.diff, derby-1895v2.stat
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1895) Convert jdbcapi/blobclob4BLOB.java to Junit

Posted by "Fernanda Pizzorno (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1895?page=all ]

Fernanda Pizzorno updated DERBY-1895:
-------------------------------------

    Attachment: derby-1895.diff
                derby-1895.stat
                derby-1895.html

The attached patch (derby-1895.diff) converts the test jdbcapi/blobclob4blob.java to junit. The attached html file (derby-1895.html) explains the changes done to the test.

A summary of what it tested by this test can be found at: http://wiki.apache.org/db-derby/BlobClob4BlobTestCoverage.

Can someone please review the patch?

> Convert jdbcapi/blobclob4BLOB.java to Junit
> -------------------------------------------
>
>                 Key: DERBY-1895
>                 URL: http://issues.apache.org/jira/browse/DERBY-1895
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Fernanda Pizzorno
>         Assigned To: Fernanda Pizzorno
>         Attachments: derby-1895.diff, derby-1895.html, derby-1895.stat
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1895) Convert jdbcapi/blobclob4BLOB.java to Junit

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-1895:
----------------------------------

    Component/s: Test

> Convert jdbcapi/blobclob4BLOB.java to Junit
> -------------------------------------------
>
>                 Key: DERBY-1895
>                 URL: https://issues.apache.org/jira/browse/DERBY-1895
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: Fernanda Pizzorno
>            Assignee: Fernanda Pizzorno
>             Fix For: 10.3.1.4
>
>         Attachments: derby-1895.diff, derby-1895.html, derby-1895.stat, derby-1895v2.diff, derby-1895v2.stat
>
>


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