Editor's pick

Concurrency
Deterministic Time Tests in Go 1.25 With testing synctest
Use testing/synctest in Go 1.25 to test code that sleeps, ticks and times out without waiting: virtual time, synctest.Wait and the limits.
7 min read
Tag
2 articles

Use testing/synctest in Go 1.25 to test code that sleeps, ticks and times out without waiting: virtual time, synctest.Wait and the limits.

WaitGroup.Go in Go 1.25 starts a goroutine and handles Add and Done for you. See the before and after, what it removes, and where it still falls short.