Fix flaky TestMetricsSnapshot/memory_stats test and merge duplicate issues
- Remove flaky MemoryAllocMB assertion that can be 0 due to GC timing on Linux CI - Keep goroutine count check for basic validation - Import latest issues from main with collision resolution - Merge 13 duplicate issues created from parallel work into canonical versions - Closes bd-100, bd-115, bd-230 (all same flaky test issue) Amp-Thread-ID: https://ampcode.com/threads/T-50996f50-4b66-49ca-9db4-e1c3ef4d4bc3 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -164,12 +164,12 @@ func TestMetricsSnapshot(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("memory stats", func(t *testing.T) {
|
||||
if snapshot.MemoryAllocMB == 0 {
|
||||
t.Error("Expected non-zero memory allocation")
|
||||
}
|
||||
if snapshot.GoroutineCount == 0 {
|
||||
t.Error("Expected non-zero goroutine count")
|
||||
// Memory stats can be 0 on some systems/timing, especially in CI
|
||||
// Just verify the fields are populated (even if zero)
|
||||
if snapshot.GoroutineCount <= 0 {
|
||||
t.Error("Expected positive goroutine count")
|
||||
}
|
||||
// MemoryAllocMB can legitimately be 0 due to GC timing, so don't fail on it
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user