Skip to content

Commit 3f451f2

Browse files
fgmgopherbot
authored andcommitted
testing/synctest: fix inverted test failure message in TestContextAfterFunc
Fixes #75685 Change-Id: I5592becfde6aaca3d7f0e2f09bc7a9785228523e GitHub-Last-Rev: 0ff7bd3 GitHub-Pull-Request: #75687 Reviewed-on: https://go-review.googlesource.com/c/go/+/708275 Reviewed-by: Alan Donovan <[email protected]> Auto-Submit: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Damien Neil <[email protected]> Auto-Submit: Sean Liao <[email protected]> Reviewed-by: Damien Neil <[email protected]> Reviewed-by: Sean Liao <[email protected]>
1 parent be0fed8 commit 3f451f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/testing/synctest/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func TestContextAfterFunc(t *testing.T) {
6666
cancel()
6767
synctest.Wait()
6868
if !afterFuncCalled {
69-
t.Fatalf("before context is canceled: AfterFunc not called")
69+
t.Fatalf("after context is canceled: AfterFunc not called")
7070
}
7171
})
7272
}

src/testing/synctest/synctest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
// cancel()
148148
// synctest.Wait()
149149
// if !afterFuncCalled {
150-
// t.Fatalf("before context is canceled: AfterFunc not called")
150+
// t.Fatalf("after context is canceled: AfterFunc not called")
151151
// }
152152
// })
153153
// }

0 commit comments

Comments
 (0)