Sha256: f2b2172f6d1c0daa82b8f5d491e84d767d24cc05a6d3287d0f4b452fee3abca4
Contents?: true
Size: 794 Bytes
Versions: 41
Compression:
Stored size: 794 Bytes
Contents
# # Test ChimpQueue # require 'lib/right_chimp.rb' require 'rspec' include Chimp describe ChimpQueue do before :all do @queue = ChimpQueue.instance @queue.max_threads = 3 @queue.start end before :each do @queue.reset! end it "should accept work" do @queue.push(:default, ExecNoop.new(:job_id => 0)) @queue.group[:default].get_job(0).status.should == Executor::STATUS_NONE end it "should distribute work" do @queue.push(:default, ExecNoop.new(:job_id => 0)) @queue.shift.status.should == Executor::STATUS_NONE end it "should process the queue" do @queue.push(:default, ExecNoop.new(:job_id => 0)) @queue.wait_until_done(:default) { } @queue.group[:default].get_job(0).status.should == Executor::STATUS_DONE end end
Version data entries
41 entries across 41 versions & 1 rubygems