Open ali-bugdayci opened 10 years ago
Trying moving the test env earlier:
database: db/test<%= ENV['TEST_ENV_NUMBER'] %>.sqlite3
It shouldn't make a difference, but I personally structure it a little differently, so it might be worth a try:
database: <%= "db/test#{ENV['TEST_ENV_NUMBER']}".sqlite3 %>
thx for helping out @ronwsmith !
Still getting the same error. If database.yml was erroneous, then I should take migration errors.
parallel_rspec spec -n 1 works but when multiple processes work it gives: SQLite3::BusyException:
database.yml
database: db/test<%= ENV['TEST_ENV_NUMBER'] %>.sqlite3
~/code/f[master*]% ls -1 db/test*
db/test2.sqlite3
db/test3.sqlite3
db/test4.sqlite3
db/test5.sqlite3
db/test6.sqlite3
db/test7.sqlite3
db/test8.sqlite3
db/test.sqlite3
By the way, it magically runs fine with zeus.
zeus parallel_rspec spec
18 examples, 0 failures, 2 pendings
But since these issues are multi forked/threaded stuff, leading to race conditions, I suspect that it might not work in the future.
I'm not familiar with SQLite3, but it sounds like something is hitting the main db before the threading begins. Researching that error and found that a common fix is to add timeout: 10000
to your database.yml for the env you're in. Does that help?
It's almost certainly spring, holding on to the original db configuration. To confirm, remove spring from your Gemfile and binstubs. You can conditionally disable spring when TEST_ENV_NUMBER
is present, but I'll leave that as an exercise to the reader.
Using: parallel_tests 0.16.6.
Getting the sqlite busy exception when running tests through parallel_tests. I even tried pool 1 inside database.yml, on the test database so that each spec waits for the next one.
"parallel_rspec spec -n 1" works fine, when I give "-n 2" it fails.
Am I missing something?
database.yml: