Sha256: 735d69dcbaea648bfc727a64870f91c928a9a8bb5351f85b8771ebffb96a3cda
Contents?: true
Size: 610 Bytes
Versions: 53
Compression:
Stored size: 610 Bytes
Contents
# encoding: utf-8 require "spec_helper" require "logstash/util/wrapped_synchronous_queue" describe LogStash::Util::WrappedSynchronousQueue do context "#offer" do context "queue is blocked" do it "fails and give feedback" do expect(subject.offer("Bonjour", 2)).to be_falsey end end context "queue is not blocked" do before do @consumer = Thread.new { loop { subject.take } } sleep(0.1) end after do @consumer.kill end it "inserts successfully" do expect(subject.offer("Bonjour", 20)).to be_truthy end end end end
Version data entries
53 entries across 53 versions & 3 rubygems