Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typos #1

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading