Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
[jruby/test] give jruby a bit more time
Browse files Browse the repository at this point in the history
[AO-9244]
  • Loading branch information
prettycoder committed Aug 7, 2018
1 parent 8765a24 commit 19e9286
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/integration/queue_wait_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ def teardown
def test_milliseconds
get '/milli'

# give jruby a bit more time since it can be slow
delta = defined?(JRUBY_VERSION) ? 6 : 4

# puts "milli: #{aggregate["rack.request.queue.time"].inspect}"
assert_equal 1, aggregate["rack.request.queue.time"][:count],
'should track total queue time'
assert_in_delta 5, aggregate["rack.request.queue.time"][:sum], 4
assert_in_delta 5, aggregate["rack.request.queue.time"][:sum], delta
end

def test_microseconds
Expand All @@ -37,10 +40,13 @@ def test_microseconds
def test_queue_start
get '/queue_start'

# give jruby a bit more time since it can be slow
delta = defined?(JRUBY_VERSION) ? 6 : 4

# puts "micro: #{aggregate["rack.request.queue.time"].inspect}"
assert_equal 1, aggregate["rack.request.queue.time"][:count],
'should track total queue time'
assert_in_delta 15, aggregate["rack.request.queue.time"][:sum], 4
assert_in_delta 15, aggregate["rack.request.queue.time"][:sum], delta
end

def test_with_t
Expand Down

0 comments on commit 19e9286

Please sign in to comment.