Skip to content

Instantly share code, notes, and snippets.

@untergeek
Created October 26, 2015 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save untergeek/02d2cf94fc96cdbbb1ca to your computer and use it in GitHub Desktop.
Save untergeek/02d2cf94fc96cdbbb1ca to your computer and use it in GitHub Desktop.
The plot thickens... This is on a newly installed box, with no other deps installed anywhere.
failures in bulk class expected behavior
should retry an event until max_retries reached
RSpec::Mocks::MockExpectationError: (LogStash::Outputs::ElasticSearch: {"manage_template"=>true, "index"=>"logstash-2014.11.17", "template_overwrite"=>true, "hosts"=>["127.0.0.1"], "retry_max_items"=>10, "retry_max_interval"=>1, "max_retries"=>3, "codec"=><LogStash::Codecs::Plain charset=>"UTF-8">, "workers"=>1, "template_name"=>"logstash", "flush_size"=>500, "idle_flush_time"=>1, "action"=>"index", "path"=>"/", "ssl"=>false, "ssl_certificate_verification"=>true, "sniffing"=>false, "sniffing_delay"=>5, "doc_as_upsert"=>false, "upsert"=>""}).submit([["index", {:_id=>nil, :_index=>"logstash-2014.11.17", :_type=>"logs", :_routing=>nil}, #<LogStash::Event:0x6ca5d544 @metadata_accessors=#<LogStash::Util::Accessors:0x360bb9b1 @store={"retry_count"=>3}, @lut={}>, @cancelled=false, @data={"somevalue"=>100, "@timestamp"=>"2014-11-17T20:37:17.223Z", "@version"=>"1"}, @metadata={"retry_count"=>3}, @accessors=#<LogStash::Util::Accessors:0xc8a2a0b @store={"somevalue"=>100, "@timestamp"=>"2014-11-17T20:37:17.223Z", "@version"=>"1"}, @lut={"type"=>[{"somevalue"=>100, "@timestamp"=>"2014-11-17T20:37:17.223Z", "@version"=>"1"}, "type"]}>>]])
expected: 3 times with arguments: ([["index", {:_id=>nil, :_routing=>nil, :_index=>"logstash-2014.11.17", :_type=>"logs"}, #<LogStash::Event:0x6ca5d544 @metadata_accessors=#<LogStash::Util::Accessors:0x360bb9b1 @store={"retry_count"=>3}, @lut={}>, @cancelled=false, @data={"somevalue"=>100, "@timestamp"=>"2014-11-17T20:37:17.223Z", "@version"=>"1"}, @metadata={"retry_count"=>3}, @accessors=#<LogStash::Util::Accessors:0xc8a2a0b @store={"somevalue"=>100, "@timestamp"=>"2014-11-17T20:37:17.223Z", "@version"=>"1"}, @lut={"type"=>[{"somevalue"=>100, "@timestamp"=>"2014-11-17T20:37:17.223Z", "@version"=>"1"}, "type"]}>>]])
received: 4 times with arguments: ([["index", {:_id=>nil, :_index=>"logstash-2014.11.17", :_type=>"logs", :_routing=>nil}, #<LogStash::Event:0x6ca5d544 @metadata_accessors=#<LogStash::Util::Accessors:0x360bb9b1 @store={"retry_count"=>3}, @lut={}>, @cancelled=false, @data={"somevalue"=>100, "@timestamp"=>"2014-11-17T20:37:17.223Z", "@version"=>"1"}, @metadata={"retry_count"=>3}, @accessors=#<LogStash::Util::Accessors:0xc8a2a0b @store={"somevalue"=>100, "@timestamp"=>"2014-11-17T20:37:17.223Z", "@version"=>"1"}, @lut={"type"=>[{"somevalue"=>100, "@timestamp"=>"2014-11-17T20:37:17.223Z", "@version"=>"1"}, "type"]}>>]])
__raise at /home/buh/.rvm/gems/jruby-1.7.19/gems/rspec-mocks-3.1.3/lib/rspec/mocks/error_generator.rb:213
raise_expectation_error at /home/buh/.rvm/gems/jruby-1.7.19/gems/rspec-mocks-3.1.3/lib/rspec/mocks/error_generator.rb:72
invoke_incrementing_actual_calls_by at /home/buh/.rvm/gems/jruby-1.7.19/gems/rspec-mocks-3.1.3/lib/rspec/mocks/message_expectation.rb:520
invoke at /home/buh/.rvm/gems/jruby-1.7.19/gems/rspec-mocks-3.1.3/lib/rspec/mocks/message_expectation.rb:238
message_received at /home/buh/.rvm/gems/jruby-1.7.19/gems/rspec-mocks-3.1.3/lib/rspec/mocks/proxy.rb:169
message_received at /home/buh/.rvm/gems/jruby-1.7.19/gems/rspec-mocks-3.1.3/lib/rspec/mocks/proxy.rb:313
proxy_method_invoked at /home/buh/.rvm/gems/jruby-1.7.19/gems/rspec-mocks-3.1.3/lib/rspec/mocks/method_double.rb:73
submit at /home/buh/.rvm/gems/jruby-1.7.19/gems/rspec-mocks-3.1.3/lib/rspec/mocks/method_double.rb:60
retry_flush at /home/buh/git/logstash-output-elasticsearch/lib/logstash/outputs/elasticsearch.rb:514
register at /home/buh/git/logstash-output-elasticsearch/lib/logstash/outputs/elasticsearch.rb:294
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment