db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh" <drem...@gmail.com>
Subject Re: running checkDataSource Client - remote server
Date Wed, 20 Sep 2006 15:41:17 GMT
On 9/19/06, Myrna van Lunteren <m.v.lunteren@gmail.com> wrote:
> Hi,
> I've been trying to run the test(s) checkDataSource(30).java against a
> remote server.
> Before the addition of the testClientDSConnectionAttributes() method
> (svn revision 438122,
> http://svn.apache.org/viewvc?view=rev&revision=438122) this used to
> work (mostly). However, now I get connection refused errors:
> ---------
> DataSource - EMPTY
>   getConnection() - 08001:java.net.ConnectException : Error connecting
> to server localhost on port 1527 with message Connection refused:
> connect.
> ---
> vs. expected:
> --
> DataSource - EMPTY
>   getConnection() - 08001:Required Derby DataSource property
> databaseName not set.
> ---------
> This looks at first glance like a permissions problem, but I don't
> think it is, for some reason the test is trying to make a connection
> to a server on the local machine, at least, it's whining about the
> localhost.

I had added this additional client test to checkDataSource tests. In
the test, the client DataSource objects use the default host name and
hence try to connect to default host (localhost).

Is there some way we can get the host name of machine where we intend
to run network server during tests ? Then we can use
setServerName/setPortNumber on the DataSource objects before calling
the getConnection methods. This way, it should work in remote server
and local tests.


View raw message