qa icon indicating copy to clipboard operation
qa copied to clipboard

Creating parallel databases fails for each DB

Open jisaac01 opened this issue 9 years ago • 1 comments

For each database, the tests fail on initial db setup. Running it again gets one DB further.

10:40 $ bundle exec qa rspec Warming up (overridden) config {"adapter"=>"postgresql", "username"=>"", "password"=>"", "host"=>"localhost", "database"=>"whatever_test_qa0"} Warming up (overridden) config {"adapter"=>"postgresql", "username"=>"", "password"=>"", "host"=>"localhost", "database"=>"whatever_test_qa1"} WARNING the given database DOES NOT EXIST YET! Will create it now.

...

/Users//.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec': An error has occurred, this and all later migrations canceled: (StandardError)

jisaac01 avatar Oct 14 '16 17:10 jisaac01

Hi @jisaac01

Do you have a reproducible test case I can use to debug the issue? This is obviously something that should not happen.

You see this message because qa wants to create one DB for each worker process. If you specify -jobs 1 it will not create any databases and instead use your default test database. Can you try this and see if your tests will run otherwise?

ajbouh avatar Oct 14 '16 18:10 ajbouh