fluentd 1.2.0.pre1 → 1.2.0

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.

@@ -419,4 +419,24 @@ class RetryStateHelperTest < Test::Unit::TestCase
419
419
  assert_equal (dummy_current_time + 100), s.timeout_at
420
420
  assert_equal (dummy_current_time + timeout * 0.8), s.secondary_transition_at
421
421
  end
422
+
423
+ sub_test_case 'exponential backoff' do
424
+ test 'too big steps(check inf handling)' do
425
+ s = @d.retry_state_create(:t11, :exponential_backoff, 0.1, 300, randomize: false, forever: true, backoff_base: 2)
426
+ dummy_current_time = s.start
427
+ override_current_time(s, dummy_current_time)
428
+
429
+ i = 1
430
+ while i < 1027
431
+ if i >= 1025
432
+ # With this setting, 1025+ number causes inf in `calc_interval`, so 1024 value is used for next_time
433
+ assert_nothing_raised(FloatDomainError) { s.step }
434
+ assert_equal (dummy_current_time + 0.1 * (2 ** (1024 - 1))), s.next_time
435
+ else
436
+ s.step
437
+ end
438
+ i += 1
439
+ end
440
+ end
441
+ end
422
442
  end
@@ -134,6 +134,17 @@ class SupervisorTest < ::Test::Unit::TestCase
134
134
  format json
135
135
  time_format %Y
136
136
  </log>
137
+ <counter_server>
138
+ bind 127.0.0.1
139
+ port 24321
140
+ scope server1
141
+ backup_path /tmp/backup
142
+ </counter_server>
143
+ <counter_client>
144
+ host 127.0.0.1
145
+ port 24321
146
+ timeout 2
147
+ </counter_client>
137
148
  </system>
138
149
  EOC
139
150
  conf = Fluent::Config.parse(conf_data, "(test)", "(test_dir)", true)
@@ -151,6 +162,15 @@ class SupervisorTest < ::Test::Unit::TestCase
151
162
  assert_equal TMP_ROOT_DIR, sys_conf.root_dir
152
163
  assert_equal :json, sys_conf.log.format
153
164
  assert_equal '%Y', sys_conf.log.time_format
165
+ counter_server = sys_conf.counter_server
166
+ assert_equal '127.0.0.1', counter_server.bind
167
+ assert_equal 24321, counter_server.port
168
+ assert_equal 'server1', counter_server.scope
169
+ assert_equal '/tmp/backup', counter_server.backup_path
170
+ counter_client = sys_conf.counter_client
171
+ assert_equal '127.0.0.1', counter_client.host
172
+ assert_equal 24321, counter_client.port
173
+ assert_equal 2, counter_client.timeout
154
174
  end
155
175
 
156
176
  def test_main_process_signal_handlers
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: 1.2.0.pre1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-11 00:00:00.000000000 Z
11
+ date: 2018-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -347,6 +347,7 @@ files:
347
347
  - bin/fluentd
348
348
  - code-of-conduct.md
349
349
  - example/copy_roundrobin.conf
350
+ - example/counter.conf
350
351
  - example/filter_stdout.conf
351
352
  - example/in_dummy_blocks.conf
352
353
  - example/in_dummy_with_compression.conf
@@ -426,6 +427,14 @@ files:
426
427
  - lib/fluent/config/types.rb
427
428
  - lib/fluent/config/v1_parser.rb
428
429
  - lib/fluent/configurable.rb
430
+ - lib/fluent/counter.rb
431
+ - lib/fluent/counter/base_socket.rb
432
+ - lib/fluent/counter/client.rb
433
+ - lib/fluent/counter/error.rb
434
+ - lib/fluent/counter/mutex_hash.rb
435
+ - lib/fluent/counter/server.rb
436
+ - lib/fluent/counter/store.rb
437
+ - lib/fluent/counter/validator.rb
429
438
  - lib/fluent/daemon.rb
430
439
  - lib/fluent/engine.rb
431
440
  - lib/fluent/env.rb
@@ -522,6 +531,7 @@ files:
522
531
  - lib/fluent/plugin_helper/cert_option.rb
523
532
  - lib/fluent/plugin_helper/child_process.rb
524
533
  - lib/fluent/plugin_helper/compat_parameters.rb
534
+ - lib/fluent/plugin_helper/counter.rb
525
535
  - lib/fluent/plugin_helper/event_emitter.rb
526
536
  - lib/fluent/plugin_helper/event_loop.rb
527
537
  - lib/fluent/plugin_helper/extract.rb
@@ -605,6 +615,12 @@ files:
605
615
  - test/config/test_section.rb
606
616
  - test/config/test_system_config.rb
607
617
  - test/config/test_types.rb
618
+ - test/counter/test_client.rb
619
+ - test/counter/test_error.rb
620
+ - test/counter/test_mutex_hash.rb
621
+ - test/counter/test_server.rb
622
+ - test/counter/test_store.rb
623
+ - test/counter/test_validator.rb
608
624
  - test/helper.rb
609
625
  - test/plugin/data/2010/01/20100102-030405.log
610
626
  - test/plugin/data/2010/01/20100102-030406.log
@@ -665,6 +681,7 @@ files:
665
681
  - test/plugin/test_out_stream.rb
666
682
  - test/plugin/test_output.rb
667
683
  - test/plugin/test_output_as_buffered.rb
684
+ - test/plugin/test_output_as_buffered_backup.rb
668
685
  - test/plugin/test_output_as_buffered_compress.rb
669
686
  - test/plugin/test_output_as_buffered_overflow.rb
670
687
  - test/plugin/test_output_as_buffered_retries.rb
@@ -747,12 +764,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
747
764
  version: '2.1'
748
765
  required_rubygems_version: !ruby/object:Gem::Requirement
749
766
  requirements:
750
- - - ">"
767
+ - - ">="
751
768
  - !ruby/object:Gem::Version
752
- version: 1.3.1
769
+ version: '0'
753
770
  requirements: []
754
771
  rubyforge_project:
755
- rubygems_version: 2.6.13
772
+ rubygems_version: 2.6.14.1
756
773
  signing_key:
757
774
  specification_version: 4
758
775
  summary: Fluentd event collector
@@ -775,6 +792,12 @@ test_files:
775
792
  - test/config/test_section.rb
776
793
  - test/config/test_system_config.rb
777
794
  - test/config/test_types.rb
795
+ - test/counter/test_client.rb
796
+ - test/counter/test_error.rb
797
+ - test/counter/test_mutex_hash.rb
798
+ - test/counter/test_server.rb
799
+ - test/counter/test_store.rb
800
+ - test/counter/test_validator.rb
778
801
  - test/helper.rb
779
802
  - test/plugin/data/2010/01/20100102-030405.log
780
803
  - test/plugin/data/2010/01/20100102-030406.log
@@ -835,6 +858,7 @@ test_files:
835
858
  - test/plugin/test_out_stream.rb
836
859
  - test/plugin/test_output.rb
837
860
  - test/plugin/test_output_as_buffered.rb
861
+ - test/plugin/test_output_as_buffered_backup.rb
838
862
  - test/plugin/test_output_as_buffered_compress.rb
839
863
  - test/plugin/test_output_as_buffered_overflow.rb
840
864
  - test/plugin/test_output_as_buffered_retries.rb