MCPcopy
hub / github.com/IBM/sarama / TestProduceSetAddingMessages

Function TestProduceSetAddingMessages

produce_set_test.go:40–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

38}
39
40func TestProduceSetAddingMessages(t *testing.T) {
41 _, ps := makeProduceSet()
42 msg := &ProducerMessage{Key: StringEncoder(TestMessage), Value: StringEncoder(TestMessage)}
43
44 safeAddMessage(t, ps, msg)
45
46 if ps.empty() {
47 t.Error("set shouldn't be empty when a message is added")
48 }
49
50 if !ps.readyToFlush() {
51 t.Error("by default set should be ready to flush when any message is in place")
52 }
53}
54
55func TestProduceSetAddingMessagesOverflowMessagesLimit(t *testing.T) {
56 parent, ps := makeProduceSet()

Callers

nothing calls this directly

Calls 6

makeProduceSetFunction · 0.85
StringEncoderTypeAlias · 0.85
safeAddMessageFunction · 0.85
emptyMethod · 0.80
readyToFlushMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected