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 "Anders Morken (JIRA)" <de...@db.apache.org> on 2006/04/22 01:18:05 UTC

[jira] Created: (DERBY-1245) Add o.a.derby.client.am.ClobWriter test coverage

Add o.a.derby.client.am.ClobWriter test coverage
------------------------------------------------

         Key: DERBY-1245
         URL: http://issues.apache.org/jira/browse/DERBY-1245
     Project: Derby
        Type: Sub-task

    Reporter: Anders Morken
 Assigned to: Anders Morken 




-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

Posted by "Anders Morken (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1245?page=comments#action_12375832 ] 

Anders Morken commented on DERBY-1245:
--------------------------------------

By the way, there's a public constructor in ClobWriter.java that takes no arguments. I can't see that it is used anywhere, and any ClobWriter objects initalized with it will throw NullPointerExceptions as soon as anyone tries to use them, so I'd suggest removing it?

> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1245-collateraldamage-v1.patch, DERBY-1245-lobStream-v1.patch
>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

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

    Resolution: Fixed

> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1245-collateraldamage-v1.patch, DERBY-1245-lobStream-v1.patch
>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

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

Anders Morken updated DERBY-1245:
---------------------------------

      Component: Network Client
                 Test
    Fix Version: 10.2.0.0
    Description: org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)
       Priority: Minor  (was: Major)

> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1245?page=comments#action_12413492 ] 

Kathey Marsden commented on DERBY-1245:
---------------------------------------

Submitted to the trunk:

Date: Fri May 26 09:08:48 2006
New Revision: 409688

URL: http://svn.apache.org/viewvc?rev=409688&view=rev
DERBY-1245 Add o.a.derby.client.am.ClobWriter test coverage
DERBY-1354 Writer.write(int c) to writer from Clob.setCharacterStream(long pos) appends integer value, not character

Thank you Anders for your tremendous patience waiting for commit on this patch.  Patches to add code coverage are very valuable. DERBY-1354 will also make a great addtion to 10.1.3.   For 10.1.3 port instructions see:
http://wiki.apache.org/db-derby/TenOneThreeRelease#head-5c8ce405978fa523af8eeb4bf4c4231d0faf7770


> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1245-collateraldamage-v1.patch, DERBY-1245-lobStream-v1.patch
>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

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


Thanks to Kathey for help and advice, and patiently waiting for my slow reply while I've been playing with other things. =)

> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1245-collateraldamage-v1.patch, DERBY-1245-lobStream-v1.patch
>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

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

Kathey Marsden updated DERBY-1245:
----------------------------------

    Derby Info:   (was: [Patch Available])

> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1245-collateraldamage-v1.patch, DERBY-1245-lobStream-v1.patch
>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

Posted by "Anders Morken (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1245?page=comments#action_12413486 ] 

Anders Morken commented on DERBY-1245:
--------------------------------------

I and Kathey have discussed this a bit on IRC, and since java.io.Writer#write(int c) also just casts the int to a char, we haven't come up with anything better. Also: The lobStreams patch is already included in the encodingTests suite, and the encodingTests suite still passes.
Weirdness: The encodingTests insisted on being run with the IBM jvm, but skipped all the individual tests then, because they require sun java 1.5+. Running the suite using IBM's java with Sun's 1.5 java first in $PATH worked. =)

> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1245-collateraldamage-v1.patch, DERBY-1245-lobStream-v1.patch
>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

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

Anders Morken updated DERBY-1245:
---------------------------------

    Attachment: DERBY-1245-lobStream-v1.patch

DERBY-1245-lobStream-v1.patch adds testcases for o.a.derby.client.am.ClobWriter.java to the jdbcapi/lobStreams.java test. The new tests are mostly copied from the old ones, with a few minimal comments thrown in for good measure. The master file has also been updated.

A bug in ClobWriter was discovered and fixed when writing this, I'll attach a separate (even if it is trivial) patch for that.

> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1245-lobStream-v1.patch
>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1245?page=comments#action_12412246 ] 

Kathey Marsden commented on DERBY-1245:
---------------------------------------

I took a brief look at the patch  and was concerned about encoding safety, but maybe it is ok based on the java.io.Writer definition for write.  I am not really sure.

     public void write(int c) {
         StringBuffer sb = new StringBuffer(clob_.string_.substring(0, (int) offset_ - 1));
-        sb.append(c);
+        sb.append((char)c);

Perhaps you could add this test to encodingTests suite and maybe someone else could take a look at this too.


> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1245-collateraldamage-v1.patch, DERBY-1245-lobStream-v1.patch
>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

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

Anders Morken updated DERBY-1245:
---------------------------------

    Attachment: DERBY-1245-collateraldamage-v1.patch

DERBY-1245-collateraldamage-v1.patch fixes a little bug in o.a.d.client.am.ClobWriter.java's write(int c) method. In it's original implementation the int parameter was passed directly to the StringBuffer.append() method, resulting in the int being converted to it's string representation and then appended. (i.e. passing the char 'a' to write(int c) would append the string "97" to the StringBuffer and thus the Clob. 97 is the ASCII code for the character 'a'.)

This patch should go in along with the other DERBY-1245 patch if we want tests to pass.  =)

> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1245-collateraldamage-v1.patch, DERBY-1245-lobStream-v1.patch
>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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-1245) Add o.a.derby.client.am.ClobWriter test coverage

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

Anders Morken updated DERBY-1245:
---------------------------------

    Derby Info: [Patch Available]

> Add o.a.derby.client.am.ClobWriter test coverage
> ------------------------------------------------
>
>          Key: DERBY-1245
>          URL: http://issues.apache.org/jira/browse/DERBY-1245
>      Project: Derby
>         Type: Sub-task

>   Components: Test, Network Client
>     Reporter: Anders Morken
>     Assignee: Anders Morken
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1245-collateraldamage-v1.patch, DERBY-1245-lobStream-v1.patch
>
> org.apache.derby.client.am.ClobWriter.java is currently not covered by functional tests. I'll patch something up in jdbcapi/lobStreams.java and stick a diff here when it works. =)

-- 
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