Skip to content

Commit ba091f6

Browse files
author
Aaron Schlesinger
committed
fix(pkg/gitreceive/storage/object_test.go): fix intermittent test failures
timing can cause the statter to be called more than 3 times. that case is ok, but it must be called at least three times
1 parent 999ce40 commit ba091f6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/gitreceive/storage/object_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func TestWaitForObjectMissing(t *testing.T) {
8989
err := WaitForObject(statter, bucketName, objKey, 1*time.Millisecond, 2*time.Millisecond)
9090
assert.True(t, err != nil, "no error received when there should have been")
9191
// it should make 1 call immediately, then calls at 1ms and 2ms
92-
assert.Equal(t, len(statter.Calls), 3, "number of calls to the statter")
92+
assert.True(t, len(statter.Calls) >= 3, "the statter wasn't called at least once")
9393
}
9494

9595
func TestWaitForObjectExists(t *testing.T) {

0 commit comments

Comments
 (0)