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 1
1
require "helper"
2
2
3
- require "benchmark"
4
-
5
3
class IntegrationPendingTestCase < SQLite3 ::TestCase
6
4
class ThreadSynchronizer
7
5
def initialize
@@ -103,12 +101,12 @@ def test_busy_timeout
103
101
end
104
102
synchronizer . wait_for_thread :ready_0
105
103
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' )"
110
107
end
111
- assert_operator time . real * 1000 , :>= , 1000
108
+ end_time = Time . now
109
+ assert_operator ( end_time - start_time , :>= , 1.0 )
112
110
113
111
synchronizer . send_to_thread :end_1
114
112
synchronizer . close_main
You can’t perform that action at this time.
0 commit comments