Hi Fred,

Thanks for the heads-up. Unfortunately, I need TestProf for the 
“shared_connections” feature it has (and perhaps that is the source of my 
problems). See below for details on the issue that this resolves. I know that 
the need for this goes away with 5.1 so perhaps I will just remove TestProf in 
5.0 (doing so does get rid of the error - yay!) and not test the one feature 
that needs the shared connections.

tl;dr When using Capybara, server code runs in a separate thread, with a 
separate database connection, from the test suite. This means that if I’m using 
transactional testing, data that I create within the test suite is not visible 
within the server, since the transaction is not committed (at the end of the 
test the transaction is rolled back).

> On Nov 24, 2020, at 12:13 PM, Frederick Cheung <[email protected]> 
> wrote:
> 
> Hi,
> 
> this is just a guess but
> 
> On Monday, November 23, 2020 at 9:36:23 PM UTC Jack R-G wrote:
>      
>      ThreadError:
>        deadlock; recursive locking
>      # 
> /Users/jackrg/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/test-prof-0.7.5/lib/test_prof/recipes/active_record_shared_connection.rb:50:in
>  `synchronize'
>      # 
> /Users/jackrg/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/test-prof-0.7.5/lib/test_prof/recipes/active_record_shared_connection.rb:50:in
>  `exec_no_cache'
> 
> 
> test-prof is right at the top of the stack trace and the changelog for test 
> prof 0.8 mention an issue with threading and activerecord in rails 5. 0.7.5 
> is the last version to support ruby 2.3 according to their docs, so maybe try 
> disabling test-prof (and add it back in when you're on a more recent ruby?
> 
> Cheers,
> 
> Fred
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "rspec" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rspec/78823766-9060-428e-9934-952b95f200c8n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/rspec/78823766-9060-428e-9934-952b95f200c8n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/0E7E4403-6688-4E8F-9BA6-35259CB71C71%40pobox.com.

Reply via email to