Low commit activity in last 3 years
A long-lived project that still receives updates
Execute multithreaded code while still using transactional fixtures by synchronizing db access to a single connection
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 6.1.0, < 7.2.0
 Project Readme

Execute multithreaded code while still using transactional fixtures by synchronizing db access to a single connection

Install

gem install ar_multi_threaded_transactional_tests

Usage

require 'ar_multi_threaded_transactional_tests'

it "stays in sync" do
  ArMultiThreadedTransactionalTests.activate do
    Array.new(10).map { Thread.new { 10.times { User.create! } } }.each(&:join)
  end
end

Alternatively use .activate and .deactivate

Author

Michael Grosser
michael@grosser.it
License: MIT
CI