Skip to content

Commit ba15b6d

Browse files
Update distributed_gobreaker_test.go
1 parent 100f554 commit ba15b6d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

v2/distributed_gobreaker_test.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ func setUpDCB(ctx context.Context) *DistributedCircuitBreaker[any] {
5656

5757
func tearDownDCB(dcb *DistributedCircuitBreaker[any]) {
5858
if dcb != nil {
59-
dcb.store.client.Close()
60-
dcb.store.client = nil
59+
store := dcb.store.(*storeAdapter)
60+
store.client.Close()
61+
store.client = nil
6162
}
6263

6364
if redisServer != nil {
@@ -183,12 +184,12 @@ func TestDistributedCircuitBreakerCounts(t *testing.T) {
183184

184185
state, err := dcb.getSharedState(ctx)
185186
assert.Equal(t, Counts{5, 5, 0, 5, 0}, state.Counts)
186-
assert.NoError(err)
187+
assert.NoError(t, err)
187188

188189
assert.Nil(t, failRequest(ctx, dcb))
189190
state, err = dcb.getSharedState(ctx)
190191
assert.Equal(t, Counts{6, 5, 1, 0, 1}, state.Counts)
191-
assert.NoError(err)
192+
assert.NoError(t, err)
192193
}
193194

194195
var customDCB *DistributedCircuitBreaker[any]

0 commit comments

Comments
 (0)