~/talk

Testing Time (and other asynchronous code)

Talkat GopherCon Europe 2025 · 2025-06-16..06-19· [testing, go]
links:none on file
slides:none on file

Describes a new approach that makes fast, reliable tests for async and time‑based Go code by running tests inside a controlled bubble where the time package uses a fake clock and tests call testing/synctest functions like Test and Wait to detect quiescence. It evolved from parsing runtime stacks to a proper runtime‑assisted package, works in production (now in Go 1.25), and still requires fake network or careful handling because IO and mutexes are not always durably blocked.

AI-written summary · about

  1. 0:00The challenge of testing
  2. 2:05Flakiness in timing tests
  3. 6:00Approaches to testability
  4. 10:47Observing the runtime
  5. 12:35Introducing sync test
  6. 16:00Using the sync test bubble
  7. 23:00Durably blocking operations
  8. 28:59Final notes and history
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.