Skip to content

Commit

Permalink
test: try to make sure we avoid deadlock on macos/windows in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Apr 26, 2024
1 parent c71f8da commit 3465e32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_integration_pending.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def test_busy_timeout
sync.send_to_main :ready
busy.lock
end
sync.send_to_main :done
ensure
db2&.close
end
Expand All @@ -173,9 +174,10 @@ def test_busy_timeout
end
t1sync.send_to_thread :end

assert_operator(count, *test_case[:expected_count])

busy.unlock
t2sync.wait_for_thread :done

assert_operator(count, *test_case[:expected_count])
ensure
active_thread&.join
blocking_thread&.join
Expand Down

0 comments on commit 3465e32

Please sign in to comment.