Test
func TestTimeout(t *testing.T) {
synctest.Test(t, func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
start := time.Now()
<-ctx.Done()
if d := time.Since(start); d != time.Second {
t.Errorf("wanted exactly 1s, got %v", d)
}
})
}