]> Cypherpunks repositories - gostls13.git/commitdiff
testing/synctest: fix inverted test failure message in TestContextAfterFunc
authorFrédéric G. MARAND <fgmarand@gmail.com>
Wed, 1 Oct 2025 12:46:16 +0000 (12:46 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 1 Oct 2025 16:13:30 +0000 (09:13 -0700)
Fixes #75685

Change-Id: I5592becfde6aaca3d7f0e2f09bc7a9785228523e
GitHub-Last-Rev: 0ff7bd31ecfc23222dae70194621397330f3c2da
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>
src/testing/synctest/example_test.go
src/testing/synctest/synctest.go

index 843377ea88ef7193b2ad9f942aed28ca760d6854..a86d87fcecdca13c0b0bacc0d3394cf914ef1b4d 100644 (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")
                }
        })
 }
index 707383f9c754990c4e77dd9ac52dd09ff8439034..9f499515b8881ad2c17704be4a4cda508485f0a2 100644 (file)
 //                     cancel()
 //                     synctest.Wait()
 //                     if !afterFuncCalled {
-//                             t.Fatalf("before context is canceled: AfterFunc not called")
+//                             t.Fatalf("after context is canceled: AfterFunc not called")
 //                     }
 //             })
 //     }