Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Suban05 committed Jun 23, 2024
1 parent 1bf7135 commit 3989cd1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/interactors/sbmt/outbox/process_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def check_retry_strategy(item, retry_strategy)
track_discarded(item)
Failure(:discard_item)
else
track_failed("retry stratagy returned unknown failure: #{result.failure}")
track_failed("retry strategy returned unknown failure: #{result.failure}")
Failure(:retry_strategy_failure)
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/interactors/sbmt/outbox/process_item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
context "when retry process" do
let!(:outbox_item) { create(:outbox_item, processed_at: Time.current) }

it "do not track process_latency" do
it "doesn't track process_latency" do
expect { result }.not_to measure_yabeda_histogram(Yabeda.outbox.process_latency)
end
end
Expand Down Expand Up @@ -288,7 +288,7 @@
expect(dummy_middleware).to have_received(:call).with(outbox_item)
end

it "increment errors count" do
it "increments errors count" do
expect { result }.to change { outbox_item.reload.errors_count }.from(0).to(1)
end

Expand Down Expand Up @@ -316,7 +316,7 @@
create(:outbox_item, processed_at: 1.hour.ago)
end

it "increment errors count" do
it "increments errors count" do
expect { result }.to change { outbox_item.reload.errors_count }.from(0).to(1)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/jobs/sbmt/outbox/base_delete_stale_items_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def item_classes
.to change(OutboxItem, :count).by(-1)
end

context "when item is too yang" do
context "when item is too young" do
let(:created_at) { 1.hour.ago }

it "doesn't delete item" do
Expand Down
6 changes: 3 additions & 3 deletions spec/lib/sbmt/outbox/v2/poll_throttler/composite_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@
allow(throttle_throttler).to receive(:call).and_return(Dry::Monads::Result::Success.new(Sbmt::Outbox::V2::Throttler::THROTTLE_STATUS))
end

it "return skip if present" do
it "returns skip if present" do
expect(described_class.new(throttlers: [
throttle_throttler, noop_throttler, skip_throttler, failure_throttler
]).call(0, task, nil).value!).to eq(Sbmt::Outbox::V2::Throttler::SKIP_STATUS)
end

it "return failure if present" do
it "returns failure if present" do
expect(described_class.new(throttlers: [
throttle_throttler, noop_throttler, failure_throttler
]).call(0, task, nil).failure).to eq("some err")
end

it "return throttle if present" do
it "returns throttle if present" do
expect(described_class.new(throttlers: [
throttle_throttler, noop_throttler
]).call(0, task, nil).value!).to eq(Sbmt::Outbox::V2::Throttler::THROTTLE_STATUS)
Expand Down

0 comments on commit 3989cd1

Please sign in to comment.