Search Postgresql Archives

Re: Does derby have an embedded Mode like Derby ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux