Skip to content

Commit

Permalink
Add sleep to make retry effective
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmrod committed Nov 8, 2023
1 parent d0fa85d commit 8227f33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ func testShutdownDeadlock(t *testing.T, uuid int) {
for !opened && attempt < 10 {
transport = thrift.NewTSocketFromAddrTimeout(addr, timeout, timeout)
err = transport.Open()
opened = err == nil
attempt++
if err != nil {
time.Sleep(1 * time.Second)
} else {
opened = true
}
}
require.NoError(t, err)
client := osquery.NewExtensionManagerClientFactory(transport,
Expand Down

0 comments on commit 8227f33

Please sign in to comment.