Skip to content

Commit

Permalink
fix go linter
Browse files Browse the repository at this point in the history
  • Loading branch information
sameh-farouk committed Nov 17, 2024
1 parent bac9f13 commit bb36e80
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions clients/tfchain-client-go/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ func TestConcurrentAccess(t *testing.T) {
return
}
defer sub.Release()
sub.Time()
_, err = sub.Time()
assert.NoError(t, err)
time.Sleep(10 * time.Millisecond)
}()
}
Expand Down Expand Up @@ -111,7 +112,8 @@ func TestHealthChecking(t *testing.T) {
old := sub.conn.conn
old.Client.Close()
// simulate usage of the client
sub.Time()
_, err = sub.Time()
assert.NoError(t, err)
assert.NotEqual(t, old, sub.conn.conn)
}

Expand Down Expand Up @@ -169,7 +171,8 @@ func TestStressWithFailures(t *testing.T) {
retryBackoff = time.Millisecond * 100

// Simulate work
sub.Time()
_, err = sub.Time()
assert.NoError(t, err)
time.Sleep(time.Duration(rand.Intn(250)+50) * time.Millisecond)

if id%2 == 0 && rand.Float32() < 0.1 {
Expand Down

0 comments on commit bb36e80

Please sign in to comment.