Sha256: e9af2a4cd440f7524a91a10ffa566ce65ad76bad99eeb23f3383bb29a90fe6a0
Contents?: true
Size: 502 Bytes
Versions: 2
Compression:
Stored size: 502 Bytes
Contents
require 'test_helper' class Workhorse::WorkerTest < WorkhorseTest # This test makes sure that concurrent jobs always work in different database # connections. def test_db_connections w = Workhorse::Worker.new polling_interval: 1, pool_size: 5 5.times do Workhorse.enqueue DbConnectionTestJob.new end w.start sleep 1 w.shutdown assert_equal 5, DbConnectionTestJob.db_connections.count assert_equal 5, DbConnectionTestJob.db_connections.uniq.count end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
workhorse-0.1.0 | test/workhorse/performer_test.rb |
workhorse-0.0.3 | test/workhorse/performer_test.rb |