Skip to content

Commit 2f42c38

Browse files
committed
fix: use proper error in concurrency test instead of assert.AnError
Replace testify sentinel value with descriptive error message.
1 parent ee27b0a commit 2f42c38

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

engine/internal/srv/metrics/collector_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package metrics
66

77
import (
88
"context"
9+
"fmt"
910
"net/http"
1011
"net/http/httptest"
1112
"sync"
@@ -230,7 +231,7 @@ func TestCollectAndServe_Concurrency(t *testing.T) {
230231
c.CollectAndServe(context.Background(), handler, rec, req)
231232

232233
if rec.Code != http.StatusOK {
233-
errors <- assert.AnError
234+
errors <- fmt.Errorf("unexpected status code: %d", rec.Code)
234235
}
235236
}()
236237
}

0 commit comments

Comments
 (0)