Concurrent code testing with synctest bubbles in Go
Have you ever got confused about testing functions using time.Now()? What about functions calling goroutines? Well your problems are over… or they will be over with Go 1.25, that will be released soon (probably next month) featuring the new testing/synctest package What does synctest do? Basically, it allows you to run your tests in a “bubble”, a kind of isolation from the rest of the test. It’s meant to make your life easier when testing concurrent code, avoiding flaky tests, changing your production code to be testable, and reducing the time to run tests. ...