Skip to content

Commit 014fde5

Browse files
committed
revert
1 parent 29b52aa commit 014fde5

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

lib/logstash/outputs/s3/file_repository.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ def initialize(tags, encoding, temporary_directory,
4747
start_stale_sweeper
4848
end
4949

50-
# This method is not atomic, but in the code we are using
51-
# to check if file need rotation.
5250
def keys
5351
@prefixed_factories.keys
5452
end

spec/outputs/s3/file_repository_spec.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,13 @@
6666

6767
it "returns the number of prefix keys" do
6868
expect(subject.size).to eq(0)
69-
subject.get_file(prefix_key) { |file| file.write("something") }
69+
subject.get_file(prefix_key) { |file| file.write("something") }
7070
expect(subject.size).to eq(1)
7171
end
7272

7373
it "returns all available keys" do
74-
# this method is not atomic.
75-
try {
76-
expect(subject.keys).to eq([prefix_key])
77-
}
74+
subject.get_file(prefix_key) { |file| file.write("something") }
75+
expect(subject.keys).to eq([prefix_key])
7876
end
7977

8078
it "clean stale factories" do

0 commit comments

Comments
 (0)