Issue Details (XML | Word | Printable)

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

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

test harness improvements required for running on non-ASCII systems

Created: 28/Oct/05 11:22 AM   Updated: 21/Apr/06 01:51 AM
Return to search
Component/s: Test
Affects Version/s: 10.1.1.0
Fix Version/s: 10.1.3.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works DERBY-658_101_20060407_1.diff 2006-04-08 07:37 AM Myrna van Lunteren 195 kB
Text File Licensed for inclusion in ASF works DERBY-658_101_20060407_1.stat 2006-04-08 07:37 AM Myrna van Lunteren 10 kB
Text File Licensed for inclusion in ASF works DERBY-658_101_20060413.diff 2006-04-14 02:09 AM Myrna van Lunteren 16 kB
Text File Licensed for inclusion in ASF works DERBY-658_101_20060413.stat 2006-04-14 02:09 AM Myrna van Lunteren 0.7 kB
Text File Licensed for inclusion in ASF works DERBY-658_101_20060418.diff 2006-04-19 01:27 PM Myrna van Lunteren 11 kB
Text File Licensed for inclusion in ASF works DERBY-658_101_20060418.stat 2006-04-19 01:27 PM Myrna van Lunteren 0.2 kB
Text File Licensed for inclusion in ASF works DERBY-658_102_20060307_1.diff 2006-04-08 11:05 PM Myrna van Lunteren 338 kB
Text File Licensed for inclusion in ASF works DERBY-658_102_20060307_1.stat 2006-04-08 11:05 PM Myrna van Lunteren 11 kB
Text File Licensed for inclusion in ASF works DERBY-658_102_20060413.diff 2006-04-14 12:27 AM Myrna van Lunteren 16 kB
Text File Licensed for inclusion in ASF works DERBY-658_102_20060413.stat 2006-04-14 12:27 AM Myrna van Lunteren 8 kB
Text File Licensed for inclusion in ASF works DERBY-658_102_20060418.diff 2006-04-19 01:16 PM Myrna van Lunteren 14 kB
Text File Licensed for inclusion in ASF works DERBY-658_102_20060418.stat 2006-04-19 01:16 PM Myrna van Lunteren 0.2 kB
Text File Licensed for inclusion in ASF works run_resource.patch.txt 2006-04-13 04:46 AM Andrew McIntyre 1 kB
Environment: all but especially testing should be done on zOS
Issue Links:
Reference
 

Resolution Date: 21/Apr/06 01:51 AM


 Description  « Hide
The current functionTests test harness needs adjustment for running on non-ASCII systems like zOS.
Currently, when using derbyTesting.jar built for instance on a windows or linux system on zOS the tests do not run, because the properties and runall files cannot be understood.
Until now, testers on zOS had to unjar derbyTesting.jar, then run native2ascii -Cp 1047 -reverse on all appropriate files (.sql, .txt, .out, .properties, .runall, .asc, .exclude, etc).
This is a labor intensive and error prone process. Furthermore, it causes test failures such as reported with DERBY-575, because tests may assume a certain file to be a specific length, which no longer holds true after the native2ascii conversion.

The test harness should get modified to always read the files in the same encoding.

Note however, that the comparison of actual .out and the master should still result in files readable on the local system, to enable a human to evaluate failures and results. At the same time, this raises the concern that someone might check-in an update to the master with an incorrect encoding.

To resolve the main issue, I propose the following:
- Set the default encoding in the harness.
- for each test
1) determine if the test encoding is set. We can probably use ij.ui.codeset - otherwise a new property is needed.
     Note that this means that .properties, .runall and .exclude files are always read in fixed/default encoding.
2) read the master/sql files in in the default/fixed encoding unless the encoding property is set for a test
3) Write the output out in the local encoding (the way is done currently) unless the encoding property is set (if set, write out in that encoding)
4) Change the code that creates tmpmstr to always apply instead of only for networkserver. tmpmstr files will be created in the local encoding.
5) Have FileCompare read tmpmstr in in the local encoding for the comparison.
6) either document that test development/adjustment need to be at least be verified on an ascii system, or add another property that causes a copy of the actual output to be created in the default/fixed encoding.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.