Skip to content

Commit 5cc70c2

Browse files
committed
chore(buffer): make test less brittle
1 parent 53914d0 commit 5cc70c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/linkedbuffer/buffer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func TestBufferWithPointerToLargeObject(t *testing.T) {
102102
after = int64(m.Alloc)
103103

104104
// Verify large object was garbage collected (no internal references to the large object remain)
105-
assert.Equal(t, true, before-after >= int64(dataSize))
105+
assert.Equal(t, true, before-after >= (int64(dataSize)/2))
106106

107107
// Keep a reference to these variables to ensure they are not discarded by GC
108108
fmt.Printf("%#v, %#v\n", data.data, readData.data)

0 commit comments

Comments
 (0)