aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/synctest/synctest.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testing/synctest/synctest.go b/src/testing/synctest/synctest.go
index ff88c3ec42..707383f9c7 100644
--- a/src/testing/synctest/synctest.go
+++ b/src/testing/synctest/synctest.go
@@ -7,6 +7,14 @@
// The [Test] function runs a function in an isolated "bubble".
// Any goroutines started within the bubble are also part of the bubble.
//
+// Each test should be entirely self-contained:
+// The following guidelines should apply to most tests:
+//
+// - Avoid interacting with goroutines not started from within the test.
+// - Avoid using the network. Use a fake network implementation as needed.
+// - Avoid interacting with external processes.
+// - Avoid leaking goroutines in background tasks.
+//
// # Time
//
// Within a bubble, the [time] package uses a fake clock.