Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 13825ba

Browse files
author
Doug Davis
committed
Sleep less to avoid timeouts
Signed-off-by: Doug Davis <[email protected]>
1 parent 29fbc28 commit 13825ba

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/integration/kafka_sarama_binding/kafka_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func testSenderReceiver(t testing.TB) (func(), bindings.Sender, bindings.Receive
104104

105105
// Not perfect but we need to give OpenInbound() as chance to start
106106
// as it's a race condition. I couldn't find something on 'p' to wait for
107-
time.Sleep(15 * time.Second)
107+
time.Sleep(6 * time.Second)
108108

109109
return func() {
110110
require.NoError(t, p.Close(context.TODO()))

v2/client/test/test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func SendReceive(t *testing.T, protocolFactory func() interface{}, in event.Even
3131
wg.Add(2)
3232

3333
// Give time for Kafka client protocol to get setup
34-
time.Sleep(5 * time.Second)
34+
time.Sleep(2 * time.Second)
3535

3636
go func() {
3737
ctx, cancel := context.WithCancel(context.TODO())
@@ -54,7 +54,7 @@ func SendReceive(t *testing.T, protocolFactory func() interface{}, in event.Even
5454
}()
5555

5656
// Give time for the receiever to start
57-
time.Sleep(5 * time.Second)
57+
time.Sleep(2 * time.Second)
5858

5959
go func() {
6060
defer wg.Done()

0 commit comments

Comments
 (0)