Sha256: 870a9e84d3a7ec2f90bf62c2091edf1d7e7cc99ee70b9b07ba82ec5f34712332

Contents?: true

Size: 504 Bytes

Versions: 1

Compression:

Stored size: 504 Bytes

Contents

require 'minitest/autorun'
require 'minitest/pride'
require 'mocha/setup'

require 'sidekiq'
require 'test_workers'

Sidekiq.logger.level = Logger::ERROR

REDIS = Sidekiq::RedisConnection.create(url: 'redis://localhost/15')

def redis(command, *args)
  Sidekiq.redis do |c|
    c.send(command, *args)
  end
end

def set_lock_variable!(value)
  Sidekiq.lock_container.store(value)
end

def reset_lock_variable!
  set_lock_variable!(nil)
end

def lock_container_variable
  Sidekiq.lock_container.fetch
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sidekiq-lock-0.5.0 test/test_helper.rb