Issue Details (XML | Word | Printable)

Key: DERBY-3763
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Kristian Waagan
Reporter: Kristian Waagan
Votes: 0
Watchers: 0
Operations

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

Rename BaseJDBCTestCase.usingDerbyNet

Created: 07/Jul/08 02:35 PM   Updated: 04/May/09 06:22 PM
Return to search
Component/s: Test
Affects Version/s: 10.5.1.1
Fix Version/s: 10.4.2.0, 10.5.1.1

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works derby-3763-1a-usingDB2Client.diff 2008-07-07 02:37 PM Kristian Waagan 15 kB
Text File Licensed for inclusion in ASF works derby-3763-1a-usingDB2Client.stat 2008-07-07 02:37 PM Kristian Waagan 1 kB
File Licensed for inclusion in ASF works derby-3763-1b-usingDB2Client.diff 2008-07-17 04:29 PM Kristian Waagan 15 kB
Text File Licensed for inclusion in ASF works derby-3763-1b-usingDB2Client.stat 2008-07-17 04:29 PM Kristian Waagan 1 kB

Resolution Date: 18/Jul/08 07:44 AM


 Description  « Hide
The names of the methods 'usingDerbyNet' and 'usingDerbyNetClient' in BaseJDBCTestCase are confusing.
I propose we change the one used to tell if we are using the DB2 client driver (JCC).

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Kristian Waagan added a comment - 07/Jul/08 02:37 PM
'derby-3763-1a-usingDB2Client.diff' renames BaseJDBCTestCase.usingDerbyNet to usingDB2Client.

There might be better names, I'm open for suggestions!

Patch ready for review.

Dag H. Wanvik added a comment - 08/Jul/08 12:36 PM - edited
I am OK with the name change, but just a nit: In the test BlobClob4BlobTest
you have for example this line:

        } catch (StringIndexOutOfBoundsException se) {
            assertTrue("FAIL - This exception should only happen with DerbyNet",
                    usingDerbyNet());

If you change the name of the method, the explanatory message should
probably be changes as well:

             assertTrue("FAIL - This exception should only happen with DB2 client",
                    usingDB2Client());

There are several other instances of this.

A data point, the "Net=db2 client", "Client=Derby client" convention
is still used in the old (non-JUnit tests), but I agree it is better
to remove this source of confusion and be explicit as you propose.


Kristian Waagan added a comment - 08/Jul/08 02:27 PM
Thanks for the comment Dag.

I'll wait a while and see if anyone else has strong feelings about this.
If I go ahead with the current proposal, I'll change the comments/strings as you pointed out.
Since the current convention comes from the old test harness, I think it is acceptable to change it to something better in the new one. Others might think differently, if so please speak up.


BTW; If it had been "DerbyNet" and "DerbyClient" it would have been kind of okay, but it's "DerbyNet" and "DerbyNetClient" and that I find confusing.

Kristian Waagan added a comment - 17/Jul/08 04:29 PM
Patch 1b changes some additional comments as suggested by Dag and includes an additional change in JDBCClient.
TestConfiguration is still using the string "DerbyNet" when parsing properties from the old harness.

suites.All passed, running derbyall.
Plan to commit tomorrow.

Kristian Waagan added a comment - 18/Jul/08 07:44 AM
My test runs passed with patch 1b applied.

Committed 'derby-3763-1b-usingDB2Client.diff' to trunk with revision 677848.
Backported to 10.4 with revision 677849.