File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 11require "helper"
22
3- require "benchmark"
4-
53class IntegrationPendingTestCase < SQLite3 ::TestCase
64 class ThreadSynchronizer
75 def initialize
@@ -103,12 +101,12 @@ def test_busy_timeout
103101 end
104102 synchronizer . wait_for_thread :ready_0
105103
106- time = Benchmark . measure do
107- assert_raise ( SQLite3 ::BusyException ) do
108- @db . execute "insert into foo (b) values ( 'from 2' )"
109- end
104+ start_time = Time . now
105+ assert_raise ( SQLite3 ::BusyException ) do
106+ @db . execute "insert into foo (b) values ( 'from 2' )"
110107 end
111- assert_operator time . real * 1000 , :>= , 1000
108+ end_time = Time . now
109+ assert_operator ( end_time - start_time , :>= , 1.0 )
112110
113111 synchronizer . send_to_thread :end_1
114112 synchronizer . close_main
You can’t perform that action at this time.
0 commit comments