Skip to content

Commit bf4b8e5

Browse files
committed
[tests] change super to super() - jruby/jruby#6571
1 parent be04655 commit bf4b8e5

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

spec/filewatch/reading_spec.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ module FileWatch
9191
context "when watching a directory with files using striped reading" do
9292
let(:file_path2) { ::File.join(directory, "2.log") }
9393
# use a chunk size that does not align with the line boundaries
94-
let(:opts) { super.merge(:file_chunk_size => 10, :file_chunk_count => 1, :file_sort_by => "path")}
94+
let(:opts) { super().merge(:file_chunk_size => 10, :file_chunk_count => 1, :file_sort_by => "path")}
9595
let(:lines) { [] }
9696
let(:observer) { TestObserver.new(lines) }
9797
let(:listener2) { observer.listener_for(file_path2) }
@@ -121,7 +121,7 @@ module FileWatch
121121
end
122122

123123
context "when a non default delimiter is specified and it is not in the content" do
124-
let(:opts) { super.merge(:delimiter => "\nø") }
124+
let(:opts) { super().merge(:delimiter => "\nø") }
125125
let(:actions) do
126126
RSpec::Sequencing.run("create file") do
127127
File.open(file_path, "wb") { |file| file.write("line1\nline2") }
@@ -154,7 +154,7 @@ module FileWatch
154154
let(:file_path2) { ::File.join(directory, "2.log") }
155155
let(:file_path3) { ::File.join(directory, "3.log") }
156156

157-
let(:opts) { super.merge(:file_sort_by => "last_modified") }
157+
let(:opts) { super().merge(:file_sort_by => "last_modified") }
158158
let(:lines) { [] }
159159
let(:observer) { TestObserver.new(lines) }
160160

@@ -195,7 +195,7 @@ module FileWatch
195195
end
196196

197197
context "when watching a directory with files using exit_after_read" do
198-
let(:opts) { super.merge(:exit_after_read => true, :max_open_files => 2) }
198+
let(:opts) { super().merge(:exit_after_read => true, :max_open_files => 2) }
199199
let(:file_path3) { ::File.join(directory, "3.log") }
200200
let(:file_path4) { ::File.join(directory, "4.log") }
201201
let(:file_path5) { ::File.join(directory, "5.log") }

spec/filewatch/rotate_spec.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ module FileWatch
219219
end
220220

221221
context "create + rename rotation: when a new logfile is renamed to a path we have seen before but not all content from the previous the file is read" do
222-
let(:opts) { super.merge(
222+
let(:opts) { super().merge(
223223
:file_chunk_size => line1.bytesize.succ,
224224
:file_chunk_count => 1
225225
) }
@@ -296,7 +296,7 @@ module FileWatch
296296
end
297297

298298
context "copy + truncate rotation: when a logfile is copied to a new path and truncated before the open file is fully read" do
299-
let(:opts) { super.merge(
299+
let(:opts) { super().merge(
300300
:file_chunk_size => line1.bytesize.succ,
301301
:file_chunk_count => 1
302302
) }
@@ -370,7 +370,7 @@ module FileWatch
370370
end
371371

372372
context "? rotation: when an active file is renamed inside the glob and the reading lags behind" do
373-
let(:opts) { super.merge(
373+
let(:opts) { super().merge(
374374
:file_chunk_size => line1.bytesize.succ,
375375
:file_chunk_count => 2
376376
) }
@@ -409,7 +409,7 @@ module FileWatch
409409
end
410410

411411
context "? rotation: when a not active file is rotated outside the glob before the file is read" do
412-
let(:opts) { super.merge(
412+
let(:opts) { super().merge(
413413
:close_older => 3600,
414414
:max_open_files => 1,
415415
:file_sort_by => "path"

spec/filewatch/tailing_spec.rb

+10-10
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ module FileWatch
7777

7878
context "when close_older is set" do
7979
let(:wait_before_quit) { 0.8 }
80-
let(:opts) { super.merge(:close_older => 0.1, :max_open_files => 1, :stat_interval => 0.1) }
80+
let(:opts) { super().merge(:close_older => 0.1, :max_open_files => 1, :stat_interval => 0.1) }
8181
let(:suffix) { "B" }
8282
it "opens both files" do
8383
actions.activate_quietly
@@ -278,7 +278,7 @@ module FileWatch
278278

279279
context "when watching a directory with files and a file is renamed to match glob", :unix => true do
280280
let(:suffix) { "H" }
281-
let(:opts) { super.merge(:close_older => 0) }
281+
let(:opts) { super().merge(:close_older => 0) }
282282
let(:listener2) { observer.listener_for(file_path2) }
283283
let(:actions) do
284284
RSpec::Sequencing
@@ -346,7 +346,7 @@ module FileWatch
346346
end
347347

348348
context "when close older expiry is enabled" do
349-
let(:opts) { super.merge(:close_older => 1) }
349+
let(:opts) { super().merge(:close_older => 1) }
350350
let(:suffix) { "J" }
351351
let(:actions) do
352352
RSpec::Sequencing.run("create file") do
@@ -370,7 +370,7 @@ module FileWatch
370370
end
371371

372372
context "when close older expiry is enabled and after timeout the file is appended-to" do
373-
let(:opts) { super.merge(:close_older => 0.5) }
373+
let(:opts) { super().merge(:close_older => 0.5) }
374374
let(:suffix) { "K" }
375375
let(:actions) do
376376
RSpec::Sequencing
@@ -406,7 +406,7 @@ module FileWatch
406406
end
407407

408408
context "when ignore older expiry is enabled and all files are already expired" do
409-
let(:opts) { super.merge(:ignore_older => 1) }
409+
let(:opts) { super().merge(:ignore_older => 1) }
410410
let(:suffix) { "L" }
411411
let(:actions) do
412412
RSpec::Sequencing
@@ -430,7 +430,7 @@ module FileWatch
430430

431431
context "when a file is renamed before it gets activated", :unix => true do
432432
let(:max) { 1 }
433-
let(:opts) { super.merge(:file_chunk_count => 8, :file_chunk_size => 6, :close_older => 0.1, :discover_interval => 6) }
433+
let(:opts) { super().merge(:file_chunk_count => 8, :file_chunk_size => 6, :close_older => 0.1, :discover_interval => 6) }
434434
let(:suffix) { "M" }
435435
let(:start_new_files_at) { :beginning } # we are creating files and sincedb record before hand
436436
let(:actions) do
@@ -469,7 +469,7 @@ module FileWatch
469469
end
470470

471471
context "when ignore_older is less than close_older and all files are not expired" do
472-
let(:opts) { super.merge(:ignore_older => 1, :close_older => 1.1) }
472+
let(:opts) { super().merge(:ignore_older => 1, :close_older => 1.1) }
473473
let(:suffix) { "N" }
474474
let(:start_new_files_at) { :beginning }
475475
let(:actions) do
@@ -497,7 +497,7 @@ module FileWatch
497497
end
498498

499499
context "when ignore_older is less than close_older and all files are expired" do
500-
let(:opts) { super.merge(:ignore_older => 10, :close_older => 1) }
500+
let(:opts) { super().merge(:ignore_older => 10, :close_older => 1) }
501501
let(:suffix) { "P" }
502502
let(:actions) do
503503
RSpec::Sequencing
@@ -522,7 +522,7 @@ module FileWatch
522522
end
523523

524524
context "when ignore older and close older expiry is enabled and after timeout the file is appended-to" do
525-
let(:opts) { super.merge(:ignore_older => 20, :close_older => 0.5) }
525+
let(:opts) { super().merge(:ignore_older => 20, :close_older => 0.5) }
526526
let(:suffix) { "Q" }
527527
let(:actions) do
528528
RSpec::Sequencing
@@ -551,7 +551,7 @@ module FileWatch
551551
end
552552

553553
context "when a non default delimiter is specified and it is not in the content" do
554-
let(:opts) { super.merge(:ignore_older => 20, :close_older => 1, :delimiter => "\nø") }
554+
let(:opts) { super().merge(:ignore_older => 20, :close_older => 1, :delimiter => "\nø") }
555555
let(:suffix) { "R" }
556556
let(:actions) do
557557
RSpec::Sequencing

spec/inputs/file_read_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
describe 'delete on complete' do
268268

269269
let(:options) do
270-
super.merge({ 'file_completed_action' => "delete", 'exit_after_read' => false })
270+
super().merge({ 'file_completed_action' => "delete", 'exit_after_read' => false })
271271
end
272272

273273
let(:sample_file) { File.join(temp_directory, "sample.log") }
@@ -306,7 +306,7 @@
306306
describe 'sincedb cleanup' do
307307

308308
let(:options) do
309-
super.merge(
309+
super().merge(
310310
'sincedb_path' => sincedb_path,
311311
'sincedb_clean_after' => '1.0 seconds',
312312
'sincedb_write_interval' => 0.25,

0 commit comments

Comments
 (0)