diff options
-rw-r--r-- | activesupport/test/log_subscriber_test.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/activesupport/test/log_subscriber_test.rb b/activesupport/test/log_subscriber_test.rb index 4f413b9627..7f05459493 100644 --- a/activesupport/test/log_subscriber_test.rb +++ b/activesupport/test/log_subscriber_test.rb @@ -80,10 +80,15 @@ class SyncLogSubscriberTest < ActiveSupport::TestCase instrument "some_event.my_log_subscriber" wait event = @log_subscriber.event + if defined?(JRUBY_VERSION) + assert_equal 0, event.cpu_time + assert_equal 0, event.allocations + else + assert_operator event.cpu_time, :>, 0 + assert_operator event.allocations, :>, 0 + end assert_operator event.duration, :>, 0 - assert_operator event.cpu_time, :>, 0 assert_operator event.idle_time, :>, 0 - assert_operator event.allocations, :>, 0 end def test_does_not_send_the_event_if_it_doesnt_match_the_class |