Skip to content

Commit 0c05571

Browse files
committed
test_output_as_buffered_secondary: use getter method
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
1 parent 526d48e commit 0c05571

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/plugin/test_output_as_buffered_secondary.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def dummy_event_stream
308308

309309
assert_equal 0, @i.write_count
310310
assert_equal 0, @i.num_errors
311-
assert_equal 0, @i.instance_variable_get(:@write_secondary_count_metrics).get
311+
assert_equal 0, @i.write_secondary_count
312312

313313
@i.enqueue_thread_wait
314314
@i.flush_thread_wakeup
@@ -349,7 +349,7 @@ def dummy_event_stream
349349
assert{ @i.write_count > prev_write_count }
350350
assert{ @i.num_errors == prev_num_errors }
351351

352-
assert{ @i.instance_variable_get(:@write_secondary_count_metrics).get > 0 }
352+
assert{ @i.write_secondary_count > 0 }
353353

354354
assert_nil @i.retry
355355

@@ -446,7 +446,7 @@ def dummy_event_stream
446446
assert{ @i.buffer.dequeued[chunks[0].unique_id].nil? }
447447
assert{ chunks.first.empty? }
448448

449-
assert{ @i.instance_variable_get(:@write_secondary_count_metrics).get > 0 }
449+
assert{ @i.write_secondary_count > 0 }
450450

451451
assert_nil @i.retry
452452

@@ -742,7 +742,7 @@ def dummy_event_stream
742742

743743
assert_equal 0, @i.write_count
744744
assert_equal 0, @i.num_errors
745-
assert_equal 0, @i.instance_variable_get(:@write_secondary_count_metrics).get
745+
assert_equal 0, @i.write_secondary_count
746746

747747
@i.enqueue_thread_wait
748748
@i.flush_thread_wakeup
@@ -771,7 +771,7 @@ def dummy_event_stream
771771
prev_write_count = @i.write_count
772772
end
773773

774-
assert{ @i.instance_variable_get(:@write_secondary_count_metrics).get > 0 }
774+
assert{ @i.write_secondary_count > 0 }
775775

776776
# retry_timeout == 60(sec), retry_secondary_threshold == 0.8
777777

0 commit comments

Comments
 (0)