diff --git a/instrumentation/runtime/runtime_test.go b/instrumentation/runtime/runtime_test.go index b16a89f2600..6e58ffd67e5 100644 --- a/instrumentation/runtime/runtime_test.go +++ b/instrumentation/runtime/runtime_test.go @@ -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) @@ -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 }