mirror of
https://github.com/golang/go
synced 2025-05-22 05:48:03 +00:00
Add a synctest.Test function, superseding the experimental synctest.Run function. Promote the testing/synctest package out of experimental status. For #67434 For #73567 Change-Id: I3c5ba030860d90fe2ddb517a2f3536efd60181a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/671961 Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
381 B
381 B
New testing/synctest package
The new testing/synctest package provides support for testing concurrent code.
The [synctest.Test] function runs a test function in an isolated "bubble". Within the bubble, time package functions operate on a fake clock.
The [synctest.Wait] function waits for all goroutines in the current bubble to block.