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 Ole Solberg <Ol...@Sun.COM> on 2005/10/07 09:27:14 UTC

jdbcapi/checkDriver.java fails

Looking at last weeks reports on
http://www.multinet.no/~solberg/public/Apache/index.html I observe that 
jdbcapi/checkDriver.java fails in derbyall (and derbynetclientmats).

This occurs on all platforms *except* Windows/cygwin.


Seems like this started between 292491 and 292931.

Anyone else seeing this?


Looking at the test run directory 
derbynetclientmats/derbynetmats/DerbyNetClient/jdbcapi/checkDriver/ I 
see strange directory names like ' and " (i.e single quote and double 
quote) and 'wombat' and "wombat".



********* Diff file 
derbyall/derbynetclientmats/DerbyNetClient/derbynetmats/jdbcapi/checkDriver.diff
*** Start: checkDriver jdk1.5.0_03 DerbyNetClient derbynetmats:jdbcapi 
2005-10-01 14:05:42 ***
49 del
< EXPECTED EXCEPTION:DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ040, 
SQLERRMC: Failed to start database 
'[DERBY_SYSTEM_HOME]/wombat:create=true', see the next exception for 
details.::SQLSTATE: XJ001Java exception: 'The filename, directory name, 
or volume label syntax is incorrect: java.io.IOException'.
49a49
 > Null connection returned for url 
jdbc:derby://localhost:1527/[DERBY_SYSTEM_HOME]/wombat:create=true
51 del
< EXPECTED EXCEPTION:DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ041, 
SQLERRMC: Failed to create database '"wombat"', see the next exception 
for details.::SQLSTATE: XBM0HDirectory [DERBY_SYSTEM_HOME]/"wombat" 
cannot be created.
51a51,55
 > Connection info for 
connect(jdbc:derby://localhost:1527/"wombat";create=true, null)
 > getURL() = jdbc:derby://localhost:1527/"wombat";create=true
 > getUserName() = APP
 > CURRENT SCHEMA = APP
 > PASSED:Connection Successful with url: 
jdbc:derby://localhost:1527/"wombat";create=true
53 del
< Null connection returned for url 
jdbc:derby://localhost:1527/"[DERBY_SYSTEM_HOME]/wombat";create=true
53a57,61
.
.
.
Test Failed.
*** End:   checkDriver jdk1.5.0_03 DerbyNetClient derbynetmats:jdbcapi 
2005-10-01 14:05:54 ***



-- 
Ole Solberg, Database Technology Group,
Sun Microsystems, Trondheim, Norway

Re: jdbcapi/checkDriver.java fails

Posted by Army <qo...@sbcglobal.net>.
Ole Solberg wrote:
> Looking at last weeks reports on
> http://www.multinet.no/~solberg/public/Apache/index.html I observe that 
> jdbcapi/checkDriver.java fails in derbyall (and derbynetclientmats).
> 
> This occurs on all platforms *except* Windows/cygwin.
> 
> Seems like this started between 292491 and 292931.
> 
> Anyone else seeing this?
> 
> Looking at the test run directory 
> derbynetclientmats/derbynetmats/DerbyNetClient/jdbcapi/checkDriver/ I 
> see strange directory names like ' and " (i.e single quote and double 
> quote) and 'wombat' and "wombat".

I would guess this is the result of the patch for DERBY-374.  New test cases for 
that issue try to create databases with names that are enclosed in quotes, which 
means the test tries to create directories with quoted names.  The result of 
trying doing so is different on different platforms--that thought occurred to me 
at one point while reviewing the patch, but it then slipped my mind.

Deepa, would it be possible to rewrite the new test cases to leave off the 
"create=true" attribute?  I think we'd still be testing what we want to 
test--namely, that the urls having quotes are still processed correctly--but we 
we would avoid trying to create directories with quoted names and thus the 
behavior would (hopefully) be the same across platforms...

Am I correct in thinking that would resolve this issue?
Army


Re: jdbcapi/checkDriver.java fails

Posted by Myrna van Lunteren <m....@gmail.com>.
On 10/7/05, Deepa Remesh <dr...@gmail.com> wrote:
>
> Thanks Ole for posting the test result.
>
> I had added tests for client urls which were causing null pointer
> exceptions in network server (as part of patch for DERBY-374). I had
> run tests only on Windows. These failures are because of difference in
> the file name convention on Windows and non-Windows systems. On
> Windows, Derby checks for ":" in the path name and handles it
> differently. Also, Windows file names cannot have double-quotes in
> them. So use of double-quotes as part of database name fails on
> Windows.
>
> I can remove the problematic urls from the test. Or if there is any
> way to provide different test canons based on OS, I can do that. I
> would appreciate any suggestions for this.
>
> Thanks,
> Deepa
>

 The test harness currently doesn't deal with canons based on OS. You can
make a checkDriver_sed.properties file where you have the sed-step of the
test harness replace, or delete certain strings, so the output matches the
expected output on all platforms.
It's always better to have something that works the same on all platforms,
so the above is just a last resort...
 Myrna

Re: jdbcapi/checkDriver.java fails

Posted by Deepa Remesh <dr...@gmail.com>.
Thanks Ole for posting the test result.

I had added tests for client urls which were causing null pointer
exceptions in network server (as part of patch for DERBY-374). I had
run tests only on Windows. These failures are because of difference in
the file name convention on Windows and non-Windows systems. On
Windows, Derby checks for ":" in the path name and handles it
differently. Also, Windows file names cannot have double-quotes in
them. So use of double-quotes as part of database name fails on
Windows.

I can remove the problematic urls from the test. Or if there is any
way to provide different test canons based on OS, I can do that. I
would appreciate any suggestions for this.

Thanks,
Deepa