Skip to content

Commit

Permalink
Add mutex lock to transaction rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
owenthereal committed Aug 26, 2011
1 parent f66418f commit c2ca1e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions client/spec/spec_helper.rb
Expand Up @@ -26,11 +26,13 @@
config.use_transactional_fixtures = true

config.before :all do
@semaphore = Mutex.new
DRb.start_service
@remote_base = DRbObject.new nil, "druby://localhost:8000"
end

config.before :each do
@semaphore.lock
@remote_base.connection.increment_open_transactions
@remote_base.connection.transaction_joinable = false
@remote_base.connection.begin_db_transaction
Expand All @@ -40,5 +42,6 @@
@remote_base.connection.rollback_db_transaction
@remote_base.connection.decrement_open_transactions
@remote_base.clear_active_connections!
@semaphore.unlock
end
end
1 change: 1 addition & 0 deletions server/.rvmrc
@@ -0,0 +1 @@
rvm use 1.9.2@testing_rest_web_services_client

0 comments on commit c2ca1e0

Please sign in to comment.