Sha256: 28e399fa96179e7c01ff47a34274e3c5e18e0a148448613b3de07a0e3ff9b5d9
Contents?: true
Size: 696 Bytes
Versions: 46
Compression:
Stored size: 696 Bytes
Contents
require 'test_helper' module Shipit class UniqueJobTest < ActiveSupport::TestCase test "the lock key contains the job type" do task = shipit_tasks(:shipit_restart) job_a = ChunkRollupJob.new(task) job_b = GithubSyncJob.new(task) called = false job_a.acquire_lock do job_b.acquire_lock do called = true end end assert called end test "the lock key is serialized" do task = shipit_tasks(:shipit_restart) job = ChunkRollupJob.new(task) key = %(Shipit::ChunkRollupJob-{"_aj_globalid"=>"gid://shipit/Shipit::Task/#{task.id}"}) assert_equal key, job.lock_key(*job.arguments) end end end
Version data entries
46 entries across 46 versions & 1 rubygems