Skip to content

Commit

Permalink
Apply linter corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
iandelahorne committed Aug 29, 2024
1 parent 8e37762 commit ff4c9ae
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/adapters/activerecord_trilogy_adapter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def test_circuit_open_errors_do_not_trigger_the_circuit_breaker
end
error = Semian[:mysql_testing].circuit_breaker.last_error

assert_equal(ActiveRecord::ConnectionNotEstablished, error.class)
assert_instance_of(ActiveRecord::ConnectionNotEstablished, error)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/instrumentation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_success_instrumentation_wait_time
subscription = Semian.subscribe do |*_, wait_time|
hit = true

assert(wait_time.is_a?(Integer))
assert_kind_of(Integer, wait_time)
end
Semian[:testing].acquire {}

Expand Down
2 changes: 1 addition & 1 deletion test/lru_hash_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def test_monotonically_increasing
previous_timestamp = start_time

lru_hash.keys.zip(lru_hash.values).each do |key, val|
assert(val.updated_at > previous_timestamp, "Timestamp for #{key} was not monotonically increasing")
assert_operator(val.updated_at, :>, previous_timestamp, "Timestamp for #{key} was not monotonically increasing")
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/resource_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_initialize_with_float
end

def test_max_tickets
assert(Semian::MAX_TICKETS > 0)
assert_operator(Semian::MAX_TICKETS, :>, 0)
end

def test_register
Expand Down
8 changes: 4 additions & 4 deletions test/time_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_time_monotonic_travel_past
current = Process.clock_gettime(Process::CLOCK_MONOTONIC)
end

assert(now > current, "now #{now} should be bigger than current #{current}")
assert_operator(now, :>, current, "now #{now} should be bigger than current #{current}")
end

def test_time_monotonic_travel_future
Expand All @@ -20,7 +20,7 @@ def test_time_monotonic_travel_future
current = Process.clock_gettime(Process::CLOCK_MONOTONIC)
end

assert(now + 5 < current, "now #{now} should be less than current #{current} at least by 5 secs")
assert_operator(now + 5, :<, current, "now #{now} should be less than current #{current} at least by 5 secs")
end

def test_time_travel_past
Expand All @@ -30,7 +30,7 @@ def test_time_travel_past
current = Time.now
end

assert(now > current, "now #{now} should be bigger than current #{current}")
assert_operator(now, :>, current, "now #{now} should be bigger than current #{current}")
end

def test_time_travel_future
Expand All @@ -40,6 +40,6 @@ def test_time_travel_future
current = Time.now
end

assert(now + 5 < current, "now #{now} should be less than current #{current} at least by 5 secs")
assert_operator(now + 5, :<, current, "now #{now} should be less than current #{current} at least by 5 secs")
end
end

0 comments on commit ff4c9ae

Please sign in to comment.