I have some work to write tests for a server that talks to a database. This means creating a database and firing up a server for testing purposes, and then dropping the database and shutting down the server at the end. This also means making sure that multiple instances of the test can run on the same machine by the same or multiple users.

I'm about to do a sort of brute-force approach:

* create and populate a database called "projectname_$user_$pid"
* find an open port
* write a config file with the port and database to use
* fire up the server with that config
* run the tests
* shutdown the server
* drop the database

Seems a bit wasteful, so I'm wondering how other people handle it.


PS  This is not a CPAN thing.


--
29. The Irish MPs are not after “Me frosted lucky charms”.
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/

Reply via email to