瀏覽代碼

Don't use a RetryBackoff in tests

With mockbrokers we control the relevant ordering of messages and broker
starts/stops so it isn't necessary, all it does is slow down the tests and give
room for time-dependent behaviour to creep in.

Also shaves 500ms off the test suite.
Evan Huus 10 年之前
父節點
當前提交
c13e45e6c4
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      producer_test.go

+ 2 - 0
producer_test.go

@@ -279,6 +279,7 @@ func TestProducerFailureRetry(t *testing.T) {
 	config := NewProducerConfig()
 	config.FlushMsgCount = 10
 	config.AckSuccesses = true
+	config.RetryBackoff = 0
 	producer, err := NewProducer(client, config)
 	if err != nil {
 		t.Fatal(err)
@@ -357,6 +358,7 @@ func TestProducerBrokerBounce(t *testing.T) {
 	config := NewProducerConfig()
 	config.FlushMsgCount = 10
 	config.AckSuccesses = true
+	config.RetryBackoff = 0
 	producer, err := NewProducer(client, config)
 	if err != nil {
 		t.Fatal(err)