Sha256: 3ad653e3afadad9d14bb85aa321b8a450f1c9e61d3ffaedd002f14ae140c90a7
Contents?: true
Size: 675 Bytes
Versions: 1
Compression:
Stored size: 675 Bytes
Contents
require "spec_helper" describe Rdkafka::Producer do let(:producer) do rdkafka_config.producer end it "should require a topic" do expect { producer.produce( payload: "payload", key: "key" ) }.to raise_error ArgumentError, "missing keyword: topic" end it "should produce a message" do handle = producer.produce( topic: "produce_test_topic", payload: "payload 1", key: "key 1" ) expect(handle.pending?).to be true report = handle.wait expect(handle.pending?).to be false expect(report).not_to be_nil expect(report.partition).to eq 0 expect(report.offset).to be > 0 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rdkafka-0.0.1 | spec/rdkafka/producer_spec.rb |