Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions spec/codecs/identity_map_codec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,9 @@
l_2 = Mlc::LineListener.new(queue, imc, "stream3").tap {|o| o.accept("baz")}
end
it "three events are auto flushed from three different identities/codecs" do
sleep 0.6 # wait for auto_flush - in multiples of 0.5 plus 0.1
expect(queue.size).to eq(3)
sleep 0.6 # wait for auto_flush 1 PeriodicRunner cycle before assertion.
# try a few times with exponential backoff as timing is not 100% guaranteed
try(10) { expect(queue.size).to eq(3) }
e1, e2, e3 = queue
expect(e1.get("path")).to eq("stream1")
expect(e1.get("message")).to eq("foo")
Expand Down