Friday, October 12, 2012

Run multiple Jenkins Rails test simultaneously

Under the continuous integration platform Jenkins, there can be multiple build projects that may run at the same time.  For example, unit tests, functional tests and integration tests. 

By default, all projects may have database.yml configurations that points to the same test database.  This may lead to failure like this:

...

DETAIL:  There are 1 other session(s) using the database.  : DROP DATABASE IF EXISTS "test_db">  test_db already exists
...

To allow simultaneously tests, database yml should be modified to use different database:
/var/lib/jenkins/jobs/[Project Name]/workspace/config/database.yml


* Set the max number jobs to be run concurrently on Jenkins' settings.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.