fluentd 0.12.25 → 0.12.26
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fluentd might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/lib/fluent/supervisor.rb +6 -0
- data/lib/fluent/test/output_test.rb +11 -7
- data/lib/fluent/version.rb +1 -1
- data/test/plugin/test_out_forward.rb +29 -18
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ecb5a38a503480766ad28bd9c90d8e650e857a7
|
4
|
+
data.tar.gz: 9e033240aed3098e153ccf552987a72acfa2ab0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71605065f90941ffc682fe7811f19fe88e2899e312fdf7e0633fb3b552e00e53fc8ba68f41114ce2ca885fae825d457d86b48c0266093f55699a1571d280a4d2
|
7
|
+
data.tar.gz: c9f4609a941738a2bf2e99a9a123c074a0444c6aa9b8fdc6584e9a9d50492d47b98ad0c57e96e5440a3f94f42cac19f39ba8242604863dbf51d8454e7f588e7c
|
data/ChangeLog
CHANGED
data/lib/fluent/supervisor.rb
CHANGED
@@ -17,6 +17,12 @@
|
|
17
17
|
require 'etc'
|
18
18
|
require 'fcntl'
|
19
19
|
|
20
|
+
begin
|
21
|
+
require 'sigdump/setup'
|
22
|
+
rescue Exception
|
23
|
+
# ignore LoadError and others (related with signals): it may raise these errors in Windows
|
24
|
+
end
|
25
|
+
|
20
26
|
require 'fluent/config'
|
21
27
|
require 'fluent/env'
|
22
28
|
require 'fluent/engine'
|
@@ -76,20 +76,24 @@ module Fluent
|
|
76
76
|
def run(num_waits = 10, &block)
|
77
77
|
result = nil
|
78
78
|
super(num_waits) {
|
79
|
+
block.call if block
|
80
|
+
|
79
81
|
es = ArrayEventStream.new(@entries)
|
80
82
|
buffer = @instance.format_stream(@tag, es)
|
81
83
|
|
82
|
-
block.call if block
|
83
|
-
|
84
84
|
if @expected_buffer
|
85
85
|
assert_equal(@expected_buffer, buffer)
|
86
86
|
end
|
87
87
|
|
88
|
-
|
89
|
-
|
88
|
+
case
|
89
|
+
when @instance.is_a?(Fluent::ObjectBufferedOutput)
|
90
|
+
key = @tag
|
91
|
+
when @instance.respond_to?(:time_slicer)
|
90
92
|
# this block is only for test_out_file
|
91
|
-
time,
|
93
|
+
time, _record = @entries.first
|
92
94
|
key = @instance.time_slicer.call(time)
|
95
|
+
else
|
96
|
+
key = ''
|
93
97
|
end
|
94
98
|
chunk = @instance.buffer.new_chunk(key)
|
95
99
|
chunk << buffer
|
@@ -128,6 +132,8 @@ module Fluent
|
|
128
132
|
def run(&block)
|
129
133
|
result = []
|
130
134
|
super {
|
135
|
+
block.call if block
|
136
|
+
|
131
137
|
buffer = ''
|
132
138
|
@entries.keys.each {|key|
|
133
139
|
es = ArrayEventStream.new(@entries[key])
|
@@ -135,8 +141,6 @@ module Fluent
|
|
135
141
|
buffer << @instance.format_stream(@tag, es)
|
136
142
|
}
|
137
143
|
|
138
|
-
block.call if block
|
139
|
-
|
140
144
|
if @expected_buffer
|
141
145
|
assert_equal(@expected_buffer, buffer)
|
142
146
|
end
|
data/lib/fluent/version.rb
CHANGED
@@ -23,7 +23,7 @@ class ForwardOutputTest < Test::Unit::TestCase
|
|
23
23
|
]
|
24
24
|
|
25
25
|
def create_driver(conf=CONFIG)
|
26
|
-
Fluent::Test::
|
26
|
+
Fluent::Test::BufferedOutputTestDriver.new(Fluent::ForwardOutput) {
|
27
27
|
attr_reader :responses, :exceptions
|
28
28
|
|
29
29
|
def initialize
|
@@ -39,6 +39,13 @@ class ForwardOutputTest < Test::Unit::TestCase
|
|
39
39
|
@exceptions << e
|
40
40
|
raise e
|
41
41
|
end
|
42
|
+
|
43
|
+
# Fluentd v0.12 BufferedOutputTestDriver calls this method.
|
44
|
+
# BufferedOutput#format_stream calls format method, but ForwardOutput#format is not defined.
|
45
|
+
# Because ObjectBufferedOutput#emit calls es.to_msgpack_stream directly.
|
46
|
+
def format_stream(tag, es)
|
47
|
+
es.to_msgpack_stream
|
48
|
+
end
|
42
49
|
}.configure(conf)
|
43
50
|
end
|
44
51
|
|
@@ -231,10 +238,12 @@ class ForwardOutputTest < Test::Unit::TestCase
|
|
231
238
|
end
|
232
239
|
d.run_timeout = 2
|
233
240
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
241
|
+
assert_raise Fluent::ForwardOutputACKTimeoutError do
|
242
|
+
target_input_driver.run do
|
243
|
+
d.run do
|
244
|
+
records.each do |record|
|
245
|
+
d.emit record, time
|
246
|
+
end
|
238
247
|
end
|
239
248
|
end
|
240
249
|
end
|
@@ -272,10 +281,12 @@ class ForwardOutputTest < Test::Unit::TestCase
|
|
272
281
|
end
|
273
282
|
d.run_timeout = 2
|
274
283
|
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
284
|
+
assert_raise Fluent::ForwardOutputConnectionClosedError do
|
285
|
+
target_input_driver.run do
|
286
|
+
d.run do
|
287
|
+
records.each do |record|
|
288
|
+
d.emit record, time
|
289
|
+
end
|
279
290
|
end
|
280
291
|
end
|
281
292
|
end
|
@@ -318,7 +329,10 @@ class ForwardOutputTest < Test::Unit::TestCase
|
|
318
329
|
end
|
319
330
|
|
320
331
|
def close
|
321
|
-
@sock.
|
332
|
+
unless @sock.closed?
|
333
|
+
@sock.close_write
|
334
|
+
@sock.close
|
335
|
+
end
|
322
336
|
end
|
323
337
|
}
|
324
338
|
|
@@ -332,6 +346,7 @@ class ForwardOutputTest < Test::Unit::TestCase
|
|
332
346
|
handler.on_read(raw_data)
|
333
347
|
# chunk_counter is reset to zero only after all the data have been received and successfully deserialized.
|
334
348
|
break if handler.chunk_counter == 0
|
349
|
+
break if sock.closed?
|
335
350
|
end
|
336
351
|
if disconnect
|
337
352
|
handler.close
|
@@ -339,7 +354,10 @@ class ForwardOutputTest < Test::Unit::TestCase
|
|
339
354
|
end
|
340
355
|
sleep # wait for connection to be closed by client
|
341
356
|
ensure
|
342
|
-
sock
|
357
|
+
if sock && !sock.closed?
|
358
|
+
sock.close_write
|
359
|
+
sock.close
|
360
|
+
end
|
343
361
|
end
|
344
362
|
end
|
345
363
|
end
|
@@ -370,10 +388,6 @@ class ForwardOutputTest < Test::Unit::TestCase
|
|
370
388
|
def initialize(klass, &block)
|
371
389
|
super(klass, &block)
|
372
390
|
@engine = DummyEngineClass.new
|
373
|
-
@klass = klass
|
374
|
-
# To avoid accessing Fluent::Engine, set Engine as a plugin's class constant (Fluent::SomePlugin::Engine).
|
375
|
-
# But this makes it impossible to run tests concurrently by threading in a process.
|
376
|
-
@klass.const_set(:Engine, @engine)
|
377
391
|
end
|
378
392
|
|
379
393
|
def inject_router
|
@@ -383,9 +397,6 @@ class ForwardOutputTest < Test::Unit::TestCase
|
|
383
397
|
|
384
398
|
def run(&block)
|
385
399
|
super(&block)
|
386
|
-
@klass.class_eval do
|
387
|
-
remove_const(:Engine)
|
388
|
-
end
|
389
400
|
end
|
390
401
|
|
391
402
|
def emits
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluentd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|