ajbouh / qa

QA is a lightweight tool for running your (Ruby) tests fast.
MIT License
23 stars 1 forks source link

Creating parallel databases fails for each DB #6

Open jisaac01 opened 7 years ago

jisaac01 commented 7 years ago

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)

ajbouh commented 7 years ago

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?