Skip to content

Commit

Permalink
Delete suspend parameter
Browse files Browse the repository at this point in the history
introduced in
c612e64

and no need in ae1621f

Signed-off-by: Yuta Iwama <[email protected]>
  • Loading branch information
ganmacs committed Mar 18, 2020
1 parent 4d7cb81 commit 719c6cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/in_dummy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DummyInput < Input
desc "If specified, each generated event has an auto-incremented key field."
config_param :auto_increment_key, :string, default: nil
desc "The boolean to suspend-and-resume incremental value after restart"
config_param :suspend, :bool, default: false
config_param :suspend, :bool, default: false,deprecated: 'This parameters is ignored'
desc "The dummy data to be generated. An array of JSON hashes or a single JSON hash."
config_param :dummy, default: [{"message"=>"dummy"}] do |val|
begin
Expand Down
10 changes: 4 additions & 6 deletions test/plugin/test_in_dummy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,15 @@ def create_driver(conf)
TEST_PLUGIN_STORAGE_PATH = File.join( File.dirname(File.dirname(__FILE__)), 'tmp', 'in_dummy', 'store' )
FileUtils.mkdir_p TEST_PLUGIN_STORAGE_PATH

sub_test_case "doesn't suspend internal counters in default" do
sub_test_case 'when dummy plugin has storage which is not specified the path' do
config1 = {
'tag' => 'dummy',
'rate' => '2',
'dummy' => '[{"x": 1, "y": "1"}, {"x": 2, "y": "2"}, {"x": 3, "y": "3"}]',
'auto_increment_key' => 'id',
'suspend' => false,
}
conf1 = config_element('ROOT', '', config1, [])
test "value of auto increment key is not suspended after stop-and-start" do
test "value of auto increment key is not kept after stop-and-start" do
assert !File.exist?(File.join(TEST_PLUGIN_STORAGE_PATH, 'json', 'test-01.json'))

d1 = create_driver(conf1)
Expand Down Expand Up @@ -136,7 +135,7 @@ def create_driver(conf)
end
end

sub_test_case "suspend internal counters if suspend is true" do
sub_test_case 'when dummy plugin has storage which is specified the path' do
setup do
FileUtils.rm_rf(TEST_PLUGIN_STORAGE_PATH)
FileUtils.mkdir_p(File.join(TEST_PLUGIN_STORAGE_PATH, 'json'))
Expand All @@ -149,7 +148,6 @@ def create_driver(conf)
'rate' => '2',
'dummy' => '[{"x": 1, "y": "1"}, {"x": 2, "y": "2"}, {"x": 3, "y": "3"}]',
'auto_increment_key' => 'id',
'suspend' => true,
}
conf2 = config_element('ROOT', '', config2, [
config_element(
Expand All @@ -161,7 +159,7 @@ def create_driver(conf)
'persistent' => true,
})
])
test "value of auto increment key is suspended after stop-and-start" do
test "value of auto increment key is kept after stop-and-start" do
assert !File.exist?(File.join(TEST_PLUGIN_STORAGE_PATH, 'json', 'test-02.json'))

d1 = create_driver(conf2)
Expand Down

0 comments on commit 719c6cb

Please sign in to comment.