Re: Does derby have an embedded Mode like Derby ?

From: Paul Taylor <ijabz(at)fastmail(dot)fm>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Does derby have an embedded Mode like Derby ?
Date: 2009-08-04 15:04:42
Message-ID: 4A784E0A.6050004@fastmail.fm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kalsch 2009-08-04 15:19:54 Re: character 0xe29986 of encoding "UTF8" has no equivalent in "LATIN2"
Previous Message Pavel Stehule 2009-08-04 15:03:57 Re: parameters in functions and overlap with names of columns