aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDamien Neil <dneil@google.com>2025-05-12 11:15:08 -0700
committerGopher Robot <gobot@golang.org>2025-05-20 15:46:03 -0700
commit49a660e22cb349cf13ef0a2f6214c6fdd75afda0 (patch)
treeef5e4c8825712a119dc37929cb372747b8d21230 /doc
parent609197b406ce8d9efd39bd3984b2cade74df35a6 (diff)
downloadgo-49a660e22cb349cf13ef0a2f6214c6fdd75afda0.tar.xz
testing/synctest: add Test
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/next/6-stdlib/1-synctest.md11
-rw-r--r--doc/next/6-stdlib/99-minor/testing/synctest/67434.md1
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/next/6-stdlib/1-synctest.md b/doc/next/6-stdlib/1-synctest.md
new file mode 100644
index 0000000000..4f3cce8222
--- /dev/null
+++ b/doc/next/6-stdlib/1-synctest.md
@@ -0,0 +1,11 @@
+### New testing/synctest package
+
+The new [testing/synctest](/pkg/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](/pkg/time) package functions
+operate on a fake clock.
+
+The [synctest.Wait] function waits for all goroutines in the
+current bubble to block.
diff --git a/doc/next/6-stdlib/99-minor/testing/synctest/67434.md b/doc/next/6-stdlib/99-minor/testing/synctest/67434.md
new file mode 100644
index 0000000000..d36a55111c
--- /dev/null
+++ b/doc/next/6-stdlib/99-minor/testing/synctest/67434.md
@@ -0,0 +1 @@
+<!-- testing/synctest -->