Skip to content

Commit

Permalink
fixup! async_sender: factor out thread pool to a seprate class
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrylo committed Sep 26, 2019
1 parent 827c526 commit c307a03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/thread_pool_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
end

it "returns false" do
expect(subject << 1).to eq(false)
retval = subject << 1
subject.close
expect(retval).to eq(false)
end

it "discards tasks" do
Expand Down Expand Up @@ -94,6 +96,8 @@
end

context "when there's some work to do" do
let(:workers) { 0 }

it "logs how many tasks are left to process" do
expect(Airbrake::Loggable.instance).to receive(:debug).with(
/waiting to process \d+ task\(s\)/
Expand Down

0 comments on commit c307a03

Please sign in to comment.