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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3a1a70a3ede3a8713d613dba499b4224ae138d1
4
- data.tar.gz: 4177832b3d06ba52df8032bd5457d7bffaaccf76
3
+ metadata.gz: 8ecb5a38a503480766ad28bd9c90d8e650e857a7
4
+ data.tar.gz: 9e033240aed3098e153ccf552987a72acfa2ab0b
5
5
  SHA512:
6
- metadata.gz: 30e12945ba3a228f68ad2f8052eb4e0fab9bc6e9a21df25a7bd33c397d806c3d0ad6e04897f107935838544dd9d4fc32286b7cbeb9fb8f82b3f3e5a90c940a0e
7
- data.tar.gz: 8e4f32b8e1ab4aa053b1b147d6b6eb19f20d9c7d0f427404b0201008034c0bb2057c1de52a33868276e9014dd592960ad0068b6470553d7ef756f93d6a589c14
6
+ metadata.gz: 71605065f90941ffc682fe7811f19fe88e2899e312fdf7e0633fb3b552e00e53fc8ba68f41114ce2ca885fae825d457d86b48c0266093f55699a1571d280a4d2
7
+ data.tar.gz: c9f4609a941738a2bf2e99a9a123c074a0444c6aa9b8fdc6584e9a9d50492d47b98ad0c57e96e5440a3f94f42cac19f39ba8242604863dbf51d8454e7f588e7c
data/ChangeLog CHANGED
@@ -1,5 +1,11 @@
1
1
  # v0.12
2
2
 
3
+ ## Release 0.12.26 - 2016/05/30
4
+
5
+ ### Bug fixes
6
+
7
+ * Fix regression of not require sigdump
8
+
3
9
  ## Release 0.12.25 - 2016/05/25
4
10
 
5
11
  ### New features / Enhancement
@@ -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
- key = ''
89
- if @instance.respond_to?(:time_slicer)
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, record = @entries.first
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
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '0.12.25'
19
+ VERSION = '0.12.26'
20
20
 
21
21
  end
@@ -23,7 +23,7 @@ class ForwardOutputTest < Test::Unit::TestCase
23
23
  ]
24
24
 
25
25
  def create_driver(conf=CONFIG)
26
- Fluent::Test::OutputTestDriver.new(Fluent::ForwardOutput) {
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
- target_input_driver.run do
235
- d.run do
236
- records.each do |record|
237
- d.emit record, time
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
- target_input_driver.run do
276
- d.run do
277
- records.each do |record|
278
- d.emit record, time
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.close
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.close if 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.25
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-25 00:00:00.000000000 Z
11
+ date: 2016-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack