Sha256: 8e2db4944dc7f130a3c64d02229623d6c572c06bbb455076a25c355850eed6cb

Contents?: true

Size: 846 Bytes

Versions: 26

Compression:

Stored size: 846 Bytes

Contents

require 'test_helper'
require 'harness/queues/sidekiq_queue'
require 'sidekiq/testing'

class SidekiqTest < IntegrationTest
  def setup
    super
    Harness.config.queue = :sidekiq
  end

  def test_a_gauge_is_logged
    instrument "test-gauge", :gauge => true

    refute_empty Harness::SidekiqQueue::SendGauge.jobs

    args = Harness::SidekiqQueue::SendGauge.jobs.first['args'].first
    Harness::SidekiqQueue::SendGauge.new.perform args

    assert_gauge_logged "test-gauge"
  end

  def test_a_counter_is_logged
    instrument "test-counter", :counter => true

    refute_empty Harness::SidekiqQueue::SendCounter.jobs

    args = Harness::SidekiqQueue::SendCounter.jobs.first['args'].first
    Harness::SidekiqQueue::SendCounter.new.perform args

    assert_counter_logged "test-counter"

    assert_equal 1, counters.first.value
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
harness-0.9.1 test/integration/queues/sidekiq_test.rb
harness-0.9.0 test/integration/queues/sidekiq_test.rb
harness-0.8.1 test/integration/queues/sidekiq_test.rb
harness-0.8.0 test/integration/queues/sidekiq_test.rb
harness-0.7.0 test/integration/queues/sidekiq_test.rb
harness-0.6.0 test/integration/queues/sidekiq_test.rb
harness-0.5.0 test/integration/queues/sidekiq_test.rb
harness-0.4.0 test/integration/queues/sidekiq_test.rb
harness-0.3.0 test/integration/queues/sidekiq_test.rb
harness-0.2.16 test/integration/queues/sidekiq_test.rb
harness-0.2.15 test/integration/queues/sidekiq_test.rb
harness-0.2.14 test/integration/queues/sidekiq_test.rb
harness-0.2.13 test/integration/queues/sidekiq_test.rb
harness-0.2.12 test/integration/queues/sidekiq_test.rb
harness-0.2.11 test/integration/queues/sidekiq_test.rb
harness-0.2.10 test/integration/queues/sidekiq_test.rb
harness-0.2.9 test/integration/queues/sidekiq_test.rb
harness-0.2.8 test/integration/queues/sidekiq_test.rb
harness-0.2.7 test/integration/queues/sidekiq_test.rb
harness-0.2.6 test/integration/queues/sidekiq_test.rb