Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Jun 23, 2024
1 parent 47f34cd commit 84ad25d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion instrumentation/runtime/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func TestRefreshGoCollector(t *testing.T) {
// before the first refresh, all counters are zero
assert.Zero(t, collector.get(goMemoryAllocations))
// after the first refresh, counters are non-zero
allocateMemory(buffer)
collector.refresh()
initialAllocations := collector.get(goMemoryAllocations)
assert.NotZero(t, initialAllocations)
Expand All @@ -36,7 +37,7 @@ func TestRefreshGoCollector(t *testing.T) {
}

func allocateMemory(buffer [][]byte) [][]byte {
newBuffer := make([]byte, 100000)
newBuffer := make([]byte, 1000000)
for i := range newBuffer {
newBuffer[i] = 0
}
Expand Down

0 comments on commit 84ad25d

Please sign in to comment.