Issue Details (XML | Word | Printable)

Key: DERBY-575
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Myrna van Lunteren
Reporter: Myrna van Lunteren
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Derby

test blobclob4BLOB fails on OS 390

Created: 17/Sep/05 08:57 PM   Updated: 12/Jul/06 01:40 AM
Return to search
Component/s: Test
Affects Version/s: 10.1.1.0
Fix Version/s: 10.1.3.1, 10.2.1.6

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works DERBY-575_101_20060502.diff 2006-05-03 02:36 AM Myrna van Lunteren 334 kB
Text File Licensed for inclusion in ASF works DERBY-575_101_20060502.stat 2006-05-03 02:36 AM Myrna van Lunteren 2 kB
Text File Licensed for inclusion in ASF works DERBY-575_102_20060424.diff 2006-04-25 10:01 AM Myrna van Lunteren 338 kB
Text File Licensed for inclusion in ASF works DERBY-575_102_20060424.stat 2006-04-25 10:01 AM Myrna van Lunteren 2 kB
Environment: OS/390 (z/OS 1.06; IBM j2RE 1.4.2)
Issue Links:
Reference

Resolution Date: 03/May/06 02:50 AM


 Description  « Hide
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.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Daniel John Debrunner added a comment - 17/Sep/05 11:48 PM
Or should the test read the file with a fixed encoding so that the size remains as the test expects.

Not sure though what is doing the conversion to EBCDIC, when you run on OS 390, hopefully you don't have to covert evryrthing before running the tests.

Myrna van Lunteren added a comment - 19/Sep/05 10:22 PM
Unfortunately, you *do* have to convert most of the text files used by the various tests.
Certainly all master files, and for instance text files for import/export.

I unraveled derbyTesting.jar, used native2ascii -reverse in a script on the os390 machine to convert to Cp1047 and jar-ed it back up (for space).


Daniel John Debrunner added a comment - 19/Sep/05 11:44 PM
I would see the need to convert as a bug in the test harness. I think the harness should be reading the text files in a fixed format so that the test pass regardless of the default encoding of the platform.

Myrna van Lunteren made changes - 28/Oct/05 09:49 AM
Field Original Value New Value
Assignee Myrna van Lunteren [ myrna ]
Myrna van Lunteren added a comment - 28/Oct/05 09:50 AM
Logging a new bug for the test harness adjustment, and when that is done I'll see if the test needs further adjustments.

Myrna van Lunteren made changes - 28/Oct/05 11:23 AM
Link This issue is blocked by DERBY-658 [ DERBY-658 ]
Myrna van Lunteren added a comment - 13/Feb/06 07:37 PM
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.

Myrna van Lunteren added a comment - 22/Feb/06 10:48 AM
This has now been fixed with DERBY-903, revision 379643

Myrna van Lunteren made changes - 22/Feb/06 10:48 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Myrna van Lunteren made changes - 22/Feb/06 10:51 AM
Link This issue is blocked by DERBY-658 [ DERBY-658 ]
Myrna van Lunteren made changes - 22/Feb/06 10:52 AM
Link This issue relates to DERBY-658 [ DERBY-658 ]
Myrna van Lunteren made changes - 22/Feb/06 11:27 PM
Status Resolved [ 5 ] Closed [ 6 ]
Myrna van Lunteren added a comment - 14/Apr/06 01:59 PM
reopening issue to follow up on further work needed - the test still fails on zOS with ibm15 after fix for DERBY-658.

I need to analyse it further.

Also, the test lobStreams.java fails (see DERBY-683), and it seems to me the failures may be similar.

Myrna van Lunteren made changes - 14/Apr/06 01:59 PM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Myrna van Lunteren added a comment - 25/Apr/06 10:01 AM
Attached is a patch for this issue - DERBY-575_102_20060424.*

It contains changes to and for the tests:
jdbcapi/blobclob4BLOB.java
jdbcapi/lobStreams.java
tools/ieptests.sql

The changes boil down to ensuring that appropriate mechanisms are used to accessing supported files - and in the case of blobclob4BLOB and lobStreams, I ended up copying the supportfiles because they were used by other tests with another encoding. So now, the .utf tests are copied unchanged, i.e. in UTF-8 encoding, and the .txt files are copied into local encoding.


Myrna van Lunteren made changes - 25/Apr/06 10:01 AM
Attachment DERBY-575_102_20060424.diff [ 12325795 ]
Attachment DERBY-575_102_20060424.stat [ 12325794 ]
Myrna van Lunteren added a comment - 25/Apr/06 10:03 AM
Patch for 10.2 is attached, a patch for 10.1 will follow.

Myrna van Lunteren made changes - 25/Apr/06 10:03 AM
Derby Info [Patch Available]
Fix Version/s 10.1.3.0 [ 12310616 ]
Fix Version/s 10.2.0.0 [ 11187 ]
Repository Revision Date User Message
ASF #397028 Wed Apr 26 00:26:41 UTC 2006 fuzzylogic DERBY-575: Fix blobclob4BLOB, lobStreams, and ieptests on systems with non-ASCII
native encodings.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>
Files Changed
DEL /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/littleclob.txt
DEL /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/empty.txt
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/jdk16/ieptests.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/jdk16/blobclob4BLOB.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/blobclob4BLOB.java
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/blobclob4BLOB.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetStream_app.properties
ADD /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/short.utf (from /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/short.txt)
ADD /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/aclob.utf (from /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/aclob.txt)
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ieptests.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/build.xml
ADD /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/searchclob.utf (from /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/searchclob.txt)
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ieptests.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LOBTest.java
DEL /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/blobclob4BLOB.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/lobStreams.java
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestConnectionMethods_app.properties
DEL /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/short.txt
DEL /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/aclob.txt
DEL /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/searchclob.txt
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/blobclob4BLOB_app.properties
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/ieptests.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetStream.java
ADD /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/littleclob.utf (from /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/littleclob.txt)
ADD /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/empty.utf (from /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/empty.txt)
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/blobclob4BLOB.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/blobclob4BLOB.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/ieptests.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ieptests.sql
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/lobStreams_app.properties

Andrew McIntyre added a comment - 26/Apr/06 07:27 AM
Committed to trunk with revision 397028.

Andrew McIntyre made changes - 26/Apr/06 07:28 AM
Derby Info [Patch Available]
Fix Version/s 10.2.0.0 [ 11187 ]
Myrna van Lunteren made changes - 28/Apr/06 02:19 AM
Link This issue is related to DERBY-903 [ DERBY-903 ]
Repository Revision Date User Message
ASF #399021 Tue May 02 19:49:38 UTC 2006 fuzzylogic DERBY-575: enable LOB tests on platforms with non-ASCII native encoding.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>
Files Changed
DEL /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/searchclob.txt
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/blobclob4BLOB_app.properties
DEL /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/short.txt
ADD /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/littleclob.utf (from /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/littleclob.txt)
DEL /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/aclob.txt
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/blobclob4BLOB.out
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/ieptests.out
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ieptests.sql
ADD /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/empty.utf (from /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/empty.txt)
DEL /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/littleclob.txt
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/blobclob4BLOB.out
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/blobclob4BLOB.java
DEL /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/empty.txt
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ieptests.out
ADD /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/searchclob.utf (from /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/searchclob.txt)
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LOBTest.java
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/blobclob4BLOB.out
ADD /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/short.utf (from /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/short.txt)
ADD /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/aclob.utf (from /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/aclob.txt)
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/build.xml
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/ieptests.out

Myrna van Lunteren added a comment - 03/May/06 02:36 AM
Patch DERBY-575_101_20060502.* is the 10.1 patch for this issue. I really did an svn rename for the .txt files to .utf files, but that's not obvious. So, applying & committing this patch may need some extra care.

Myrna van Lunteren made changes - 03/May/06 02:36 AM
Attachment DERBY-575_101_20060502.stat [ 12326172 ]
Attachment DERBY-575_101_20060502.diff [ 12326173 ]
Myrna van Lunteren made changes - 03/May/06 02:37 AM
Derby Info [Patch Available]
Andrew McIntyre added a comment - 03/May/06 02:50 AM
Thanks for making the patch for 10.1, as I was unable to svn merge it. Committed to 10.1 with revision 399021.

Andrew McIntyre made changes - 03/May/06 02:50 AM
Derby Info [Patch Available]
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Repository Revision Date User Message
ASF #400106 Fri May 05 16:44:20 UTC 2006 fuzzylogic DERBY-575: merge remainder of changes from trunk missed in first patch.
Files Changed
DEL /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetStream_app.properties
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetStream.java

Myrna van Lunteren made changes - 12/Jul/06 01:40 AM
Status Resolved [ 5 ] Closed [ 6 ]