Skip to content

Commit

Permalink
Sleep less to avoid timeouts
Browse files Browse the repository at this point in the history
Signed-off-by: Doug Davis <dug@microsoft.com>
  • Loading branch information
duglin committed Oct 24, 2023
1 parent 29fbc28 commit 13825ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/integration/kafka_sarama_binding/kafka_test.go
Expand Up @@ -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()))
Expand Down
4 changes: 2 additions & 2 deletions v2/client/test/test.go
Expand Up @@ -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())
Expand All @@ -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()
Expand Down

0 comments on commit 13825ba

Please sign in to comment.