Skip to content

Commit

Permalink
Increase sleep time to fix flaky test
Browse files Browse the repository at this point in the history
InnoDB seems to raise the error "Lock wait timeout exceeded"
more than innodb_lock_wait_timeout seconds.
  • Loading branch information
abicky committed Oct 5, 2024
1 parent b0e6176 commit d835edd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ def cause_deadlock(role:)

ths = Array.new(2) do
Thread.new do
Thread.current.abort_on_exception = true
User.transaction do
barrier.await(1)
User.lock.find_by!(name: 'foo')
sleep 2
sleep 5
end
end
end
Expand Down

0 comments on commit d835edd

Please sign in to comment.