We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2c490e commit e2bb2a9Copy full SHA for e2bb2a9
1 file changed
test/test_integration_pending.rb
@@ -1,7 +1,5 @@
1
require "helper"
2
3
-require "benchmark"
4
-
5
class IntegrationPendingTestCase < SQLite3::TestCase
6
class ThreadSynchronizer
7
def initialize
@@ -103,12 +101,12 @@ def test_busy_timeout
103
101
end
104
102
synchronizer.wait_for_thread :ready_0
105
106
- time = Benchmark.measure do
107
- assert_raise(SQLite3::BusyException) do
108
- @db.execute "insert into foo (b) values ( 'from 2' )"
109
- end
+ start_time = Time.now
+ assert_raise(SQLite3::BusyException) do
+ @db.execute "insert into foo (b) values ( 'from 2' )"
110
111
- assert_operator time.real * 1000, :>=, 1000
+ end_time = Time.now
+ assert_operator(end_time - start_time, :>=, 1.0)
112
113
synchronizer.send_to_thread :end_1
114
synchronizer.close_main
0 commit comments