Re: Does derby have an embedded Mode like Derby ? - Mailing list pgsql-general

From Paul Taylor
Subject Re: Does derby have an embedded Mode like Derby ?
Date
Msg-id 4A784E0A.6050004@fastmail.fm
Whole thread Raw
In response to Re: Does derby have an embedded Mode like Derby ?  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: Does derby have an embedded Mode like Derby ?
Re: Does derby have an embedded Mode like Derby ?
List pgsql-general
Thomas Kellerer wrote:
> Paul Taylor, 04.08.2009 15:48:
>> Thats a shame, I wanted to write junit test for a java program that
>> queried a database, requiring a full database to be available for
>> unit tests is not really an environment I want to have.
>
> Well if you want to test the database, you will need a full database.
It was a simple question, does Postgres have an embedded mode (which is
still a full database) but unfortunately it does not.
>
> But you can easily setup and start a Postgres server through a batch
> file/shell script. I have a small batch file that simply uses the
> binary ZIP distribution to run initdb and create the initial
> databases. We are using this to bundle Postgres e.g. with a Tomcat web
> application.
> You don't really need to run an installer and/or create registry
> entries (for windows). This would then resemble more the Derby network
> server setup.
Yeah, but this is messy and low because you have to wait the database to
be fully initilized before running the test. And for unit tests you
should be start the database for each test, but wouldnt be possible with
your method it would be to slow. Furthermore this is a Windows only
solution, there would be  additional work to do  to setup for Mac or Linux

thanks anyway

Paul
>
>


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: parameters in functions and overlap with names of columns
Next
From: Andreas Kalsch
Date:
Subject: Re: character 0xe29986 of encoding "UTF8" has no equivalent in "LATIN2"