aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorLin Lin <linlin152@foxmail.com>2025-12-20 23:46:30 +0800
committerMichael Knyszek <mknyszek@google.com>2025-12-23 11:03:15 -0800
commit43ebed88cc661e37bf01d5336b5de13fba6e51c7 (patch)
tree423c11c684e737f0659f39581b501a7400c7f061 /src/runtime
parent81283ad33985958c63e43ada6c168da49e62de0f (diff)
downloadgo-43ebed88cc661e37bf01d5336b5de13fba6e51c7.tar.xz
runtime: improve a log message in TestCleanupLost
Updates #76929 Change-Id: I3951b14ec979b389773f782a0a89f8277c7b9a59 Reviewed-on: https://go-review.googlesource.com/c/go/+/731680 Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/mcleanup_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/runtime/mcleanup_test.go b/src/runtime/mcleanup_test.go
index 5afe85e103..dfc688a0f2 100644
--- a/src/runtime/mcleanup_test.go
+++ b/src/runtime/mcleanup_test.go
@@ -331,9 +331,14 @@ func TestCleanupLost(t *testing.T) {
}
wg.Wait()
runtime.GC()
- runtime.BlockUntilEmptyCleanupQueue(int64(10 * time.Second))
+ timeout := 10 * time.Second
+ empty := runtime.BlockUntilEmptyCleanupQueue(int64(timeout))
+ if !empty {
+ t.Errorf("failed to drain cleanup queue within %s", timeout)
+ }
+
if got := int(got.Load()); got != want {
- t.Errorf("expected %d cleanups to be executed, got %d", got, want)
+ t.Errorf("%d cleanups executed, expected %d", got, want)
}
}