Skip to content

Commit 75893cd

Browse files
committed
Fix the test to use the busy_handler_timeout= method
1 parent ee90036 commit 75893cd

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

test/test_integration_pending.rb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,7 @@ def test_busy_handler_timeout_releases_gvl
9191
end
9292
sleep 1
9393

94-
@db.busy_handler do |count|
95-
now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
96-
if count.zero?
97-
@timeout_deadline = now + 1
98-
elsif now > @timeout_deadline
99-
next false
100-
else
101-
sleep(0.001)
102-
end
103-
end
94+
@db.busy_handler_timeout = 1000
10495
busy = Mutex.new
10596
busy.lock
10697

0 commit comments

Comments
 (0)