• The Go Blog Testing Time (and other asynchronicities) In Go 1.24, we introduced the testing/synctest package as an experimental package. • This package can significantly simplify writing tests for concurrent, asynchronous code. • In Go 1.25, the testing/synctest package has graduated from experiment to general availability. • What follows is the blog version of my talk on the testing/synctest package at GopherCon Europe 2025 in Berlin. • What is an asynchronous function? • A synchronous function is pretty simple.

Article Summaries:

  • Go’s testing ecosystem has expanded with the release of the testing/synctest package. First introduced experimentally in Go 1.24, the package was promoted to general availability in Go 1.25, offering tools that simplify testing concurrent and asynchronous code. The announcement, presented at GopherCon Europe 2025 in Berlin, explains how synctest helps developers write reliable tests for functions that return immediately and perform work later-such as background clean‑ups or context deadlines. By providing utilities to wait for and assert asynchronous behavior, the package aims to reduce common pitfalls in concurrent test design.

Sources: