diff --git a/test/integration/kafka_sarama_binding/kafka_test.go b/test/integration/kafka_sarama_binding/kafka_test.go index 6c5851113..f7ea024ab 100644 --- a/test/integration/kafka_sarama_binding/kafka_test.go +++ b/test/integration/kafka_sarama_binding/kafka_test.go @@ -104,7 +104,7 @@ func testSenderReceiver(t testing.TB) (func(), bindings.Sender, bindings.Receive // Not perfect but we need to give OpenInbound() as chance to start // as it's a race condition. I couldn't find something on 'p' to wait for - time.Sleep(15 * time.Second) + time.Sleep(6 * time.Second) return func() { require.NoError(t, p.Close(context.TODO())) diff --git a/v2/client/test/test.go b/v2/client/test/test.go index 8fd5be941..82f9925d2 100644 --- a/v2/client/test/test.go +++ b/v2/client/test/test.go @@ -31,7 +31,7 @@ func SendReceive(t *testing.T, protocolFactory func() interface{}, in event.Even wg.Add(2) // Give time for Kafka client protocol to get setup - time.Sleep(5 * time.Second) + time.Sleep(2 * time.Second) go func() { ctx, cancel := context.WithCancel(context.TODO()) @@ -54,7 +54,7 @@ func SendReceive(t *testing.T, protocolFactory func() interface{}, in event.Even }() // Give time for the receiever to start - time.Sleep(5 * time.Second) + time.Sleep(2 * time.Second) go func() { defer wg.Done()