diff --git a/async_producer_test.go b/async_producer_test.go index db36517ae..c192235cc 100644 --- a/async_producer_test.go +++ b/async_producer_test.go @@ -733,6 +733,7 @@ func TestAsyncProducerMultipleRetriesWithConcurrentRequests(t *testing.T) { } func TestAsyncProducerBrokerRestart(t *testing.T) { + // Logger = log.New(os.Stdout, "[sarama] ", log.LstdFlags) seedBroker := NewMockBroker(t, 1) leader := NewMockBroker(t, 2) diff --git a/functional_test.go b/functional_test.go index 82ee8ee19..fd953ec7c 100644 --- a/functional_test.go +++ b/functional_test.go @@ -228,7 +228,7 @@ mainLoop: } for _, broker := range brokers { err := broker.Open(client.Config()) - if err != nil && err != ErrAlreadyConnected { + if err != nil && !errors.Is(err, ErrAlreadyConnected) { client.Close() continue retryLoop }