[ 
http://issues.apache.org/jira/browse/DERBY-575?page=comments#action_12366182 ] 

Myrna van Lunteren commented on DERBY-575:
------------------------------------------

After doing work following from DERBY-903 and working with the test harness 
improvement suggested with DERBY-683, I now better understand what was the 
problem with this subtest of blobclob4BLOB is.
It's the following section:
            FileReader fr = new FileReader(fileName[4]);
            ps.setInt(1, i);
            ....
            ps.setCharacterStream(6, new java.io.BufferedReader(fr),300000);
            ps.executeUpdate();
The api doc says: 
" The constructors of this class assume that the default character encoding and 
the default byte-buffer size are appropriate. To specify these values yourself, 
construct an InputStreamReader on a FileInputStream. "
Thus, to make blobclob4BLOB pass with -DderbyTesting.encoding=UTF-16 (you need 
the improved patch for test harness from DERBY-683 to run tests like that) I 
think this section needs to be changed to:
            File file = new File(fileName[4]);
            InputStream fileIS = new FileInputStream(file);
            Reader fr = new InputStreamReader(fileIS, "US-ASCII");
            ps.setInt(1, i);
           ...
            ps.setCharacterStream(6, fr, 300000);

This then passes with -DderbyTesting.encoding=UTF-16 with embedded (after also 
fixing DERBY-902) and DerbyNet. DerbyNetClient has some problem which I think 
may be due to DERBY-901

I will run some more tests, then submit a patch for DERBY-903; if that proves 
ok & gets committed, this particular bug can be closed and unlinked from 
DERBY-658.

> test blobclob4BLOB fails on OS 390
> ----------------------------------
>
>          Key: DERBY-575
>          URL: http://issues.apache.org/jira/browse/DERBY-575
>      Project: Derby
>         Type: Bug
>   Components: Test
>     Versions: 10.1.1.0
>  Environment: OS/390 (z/OS 1.06; IBM j2RE 1.4.2)
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> The subtest clobNegativeTest_Derby265 in test jdbcapi/blobclob4BLOB assumes 
> that the length of the file used (aclob.txt) is 300000 but on OS 390 (z/OS), 
> after conversion to EBCDIC, the length is 297000. The test should be modified 
> to not use a hardcoded size.

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

Reply via email to