testing/synctest: fix inverted test failure message in TestContextAfterFunc

Fixes #75685

Change-Id: I5592becfde6aaca3d7f0e2f09bc7a9785228523e
GitHub-Last-Rev: 0ff7bd31ec
GitHub-Pull-Request: golang/go#75687
Reviewed-on: https://go-review.googlesource.com/c/go/+/708275
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Damien Neil <dneil@google.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
This commit is contained in:
Frédéric G. MARAND 2025-10-01 12:46:16 +00:00 committed by Gopher Robot
parent be0fed8a5f
commit 3f451f2c54
2 changed files with 2 additions and 2 deletions

View file

@ -66,7 +66,7 @@ func TestContextAfterFunc(t *testing.T) {
cancel()
synctest.Wait()
if !afterFuncCalled {
t.Fatalf("before context is canceled: AfterFunc not called")
t.Fatalf("after context is canceled: AfterFunc not called")
}
})
}

View file

@ -147,7 +147,7 @@
// cancel()
// synctest.Wait()
// if !afterFuncCalled {
// t.Fatalf("before context is canceled: AfterFunc not called")
// t.Fatalf("after context is canceled: AfterFunc not called")
// }
// })
// }