-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"deadlock detected" with parallel_tests and postgres #301
Comments
it sounds like it's trying to do things on the same database, maybe something else that causes the deadlocks or are you sure they are coming from postgres ? |
I don't understand why but they seem to use all the same database. I id this in my spec_helper :
And it show :
So they seeems to always use You can view my complete spec helper here : https://github.com/GCorbel/lescollectionneursassocies/blob/97321cba72327e5a31efae91f8e0cc61bb32d58c/spec/spec_helper.rb. |
looks normal, maybe it's spring messing stuff up ? On Sat, Mar 8, 2014 at 8:02 AM, Guirec Corbel notifications@github.comwrote:
|
I don't thing than it's due to spring. I run the command |
It works when I do this my database.yml :
And this in my spec_helper :
I have another problem, I do |
you could try printing debuggering in does it also work with the old yml file + establish_connection "test" ?
is https://github.com/GCorbel/lescollectionneursassocies the project that's failing ? |
I was wrong for translation. That was a mistake. I have another problem with the previous solution but this is not related to this issue. I will create another issue. Thanks for your help! |
I'm encountering the same issue. I've added the environment variable to Possibly relevant gems:
|
try <% puts "ENV IS #{ENV['TEST_ENV_NUMBER']}" %> in your database.yml ... On Thu, Sep 4, 2014 at 8:32 AM, Kurt Preston notifications@github.com
|
I have the same problem. I added When i run
Which shows that the environment variable is not set, and that it is only being checked twice. |
that sounds very strange ... can you see the commands parallel_tests On Tue, Nov 11, 2014 at 3:04 PM, Ian Dickson notifications@github.com
|
For the record, I'm having this same issue. I put in some debug information to rails_helper.rb, and here's what I found out:
So it seems like with parallel test, the Rails environment is already loaded at that stage, and the db connection established. However, when that was done, the ENV var was not yet set. However, it is set correctly already from the first line of rails_helper.rb. Investigating… |
OK, it was indeed spring springing up in action (no pun intended in the background). So if you run into this, make sure spring isn't running ( |
removing spring from binstubs is good enough or using DISABLE_SPRING=1 I guess parallel_tests tasks should just blow up if spring is loaded ... On Mon, Apr 20, 2015 at 4:56 AM, Jarkko Laine notifications@github.com
|
can you make this a PR ... would be great to have this work out of the box :) |
I don't know very much about rake tasks, so I don't know how to fix if it is running with rake, but this fixes bundle exec parallel_rspec.
Hi all, I experience kinda same problem with the gem when include that in Rails5 app. Even though, locally everything passed well with
cat of
|
@yurygnutov did you managed to solve this issue? |
Hello,
In a rails application, I have this database.yml :
When I run my specs with
time rake parallel:spec
I have a lot ofdeadlock detected
.I added
puts ENV['TEST_ENV_NUMBER']
In my spec_helper and it show the process number. In works when there is only one process.What can I do?
The text was updated successfully, but these errors were encountered: