spec/outputs/statsd_spec.rb in logstash-output-statsd-2.0.2 vs spec/outputs/statsd_spec.rb in logstash-output-statsd-2.0.3

- old
+ new

@@ -41,10 +41,15 @@ subject.register end it "should receive data send to the server" do subject.receive(event) - expect(server.received).to include("logstash.spec.foo.bar:0.1|c") + # Since we are dealing with threads and networks, + # we might experience delays or timing issues. + # lets try a few times before giving up completely. + try { + expect(server.received).to include("logstash.spec.foo.bar:0.1|c") + } end end end