logstash-plugins / logstash-input-rabbitmq

Apache License 2.0
30 stars 43 forks source link

Test failling on travis #74

Closed ph closed 8 years ago

ph commented 8 years ago

Using Accessor#strict_set for specs Run options: include {:integration=>true} exclude {:redis=>true, :socket=>true, :performance=>true, :couchdb=>true, :elasticsearch=>true, :elasticsearch_secure=>true, :export_cypher=>true, :windows=>true} link: https://travis-ci.org/logstash-plugins/logstash-input-rabbitmq/builds/116974749

....FFF
Failures:
  1) with a live server receiving a message with a queue + exchange specified when the message has a payload but no message headers should save an empty message header hash
     Failure/Error: expect(event["@metadata"]).to include("rabbitmq_headers")
       expected {} to include "rabbitmq_headers"
       Diff:
       @@ -1,2 +1 @@
       -["rabbitmq_headers"]
     # ./spec/inputs/rabbitmq_spec.rb:207:in `(root)'
     # ./vendor/bundle/jruby/1.9/gems/rspec-wait-0.0.8/lib/rspec/wait.rb:46:in `(root)'
  2) with a live server receiving a message with a queue + exchange specified when message headers are available should save message headers into a @metadata field
     Failure/Error: expect(event["@metadata"]).to include("rabbitmq_headers")
       expected {} to include "rabbitmq_headers"
       Diff:
       @@ -1,2 +1 @@
       -["rabbitmq_headers"]
     # ./spec/inputs/rabbitmq_spec.rb:261:in `(root)'
     # ./vendor/bundle/jruby/1.9/gems/rspec-wait-0.0.8/lib/rspec/wait.rb:46:in `(root)'
  3) with a live server receiving a message with a queue + exchange specified when message properties are available should save message properties into a @metadata field
     Failure/Error: expect(event["@metadata"]).to include("rabbitmq_properties")
       expected {} to include "rabbitmq_properties"
       Diff:
       @@ -1,2 +1 @@
       -["rabbitmq_properties"]
     # ./spec/inputs/rabbitmq_spec.rb:233:in `(root)'
     # ./vendor/bundle/jruby/1.9/gems/rspec-wait-0.0.8/lib/rspec/wait.rb:46:in `(root)'
Finished in 37.58 seconds (files took 2.3 seconds to load)
7 examples, 3 failures
Failed examples:
rspec ./spec/inputs/rabbitmq_spec.rb:205 # with a live server receiving a message with a queue + exchange specified when the message has a payload but no message headers should save an empty message header hash
rspec ./spec/inputs/rabbitmq_spec.rb:259 # with a live server receiving a message with a queue + exchange specified when message headers are available should save message headers into a @metadata field
rspec ./spec/inputs/rabbitmq_spec.rb:231 # with a live server receiving a message with a queue + exchange specified when message properties are available should save message properties into a @metadata field
Randomized with seed 54524
ph commented 8 years ago

@andrewvc I am porting this to your attention.

andrewvc commented 8 years ago

This is a bug with the current LS preview release. This is fixed in master

MagicMicky commented 8 years ago

It doesn't seem to be fixed in master as of now ( https://travis-ci.org/logstash-plugins/logstash-input-rabbitmq )

andrewvc commented 8 years ago

@MagicMicky @ph passing now! https://travis-ci.org/logstash-plugins/logstash-input-rabbitmq

MagicMicky commented 8 years ago

@andrewvc Thanks.

Yet, it seems that I can't get the meta from rabbitmq. Am I doing something wrong?

Here is my config :

rabbitmq {
   queue => "my_queue"
   host => "myhost"
   port => 8000
   vhost => "/dev"
   exchange => "exchange" # This matches the exchange declared above
   type => "actions"
   metadata_enabled => true
  }
}
output {
  elasticsearch {
    hosts => "elasticsearch:9200"
  }
  stdout { codec => rubydebug  }
}

And in the logs (either stdout or kibana from my elk stack), no @metadata fields.

> logstash-plugin list --verbose logstash-input-rabbitmq
logstash-input-rabbitmq (4.0.1)