You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that our unit tests are running a bit slower than we'd ideally want. Since fast unit tests are key for quick feedback and smooth development cycles—as Uncle Bob and Martin Fowler often highlight—a slow suite can really slow us down. Improving the speed of these tests will not only help catch issues faster but also boost our overall productivity and make our day-to-day coding more efficient.
I'm happy to brainstorm and work on some optimisations with anyone interested.
Culprits (non-exhaustive list)
At first glance it seems that the use of time.After and time.Sleep really slows the tests down and leads to inconsistent/flaky tests. For instance this recent issue Flaky TestExecQueue_Stop #2013.
Possible misuse of the for-select idiom: for-select allow to block until channel produces value, but adding a default case with time.Sleep defeats its purpose by introducing busy waiting instead, which is a very different pattern: L142
Hey team,
Issue
I've noticed that our unit tests are running a bit slower than we'd ideally want. Since fast unit tests are key for quick feedback and smooth development cycles—as Uncle Bob and Martin Fowler often highlight—a slow suite can really slow us down. Improving the speed of these tests will not only help catch issues faster but also boost our overall productivity and make our day-to-day coding more efficient.
I'm happy to brainstorm and work on some optimisations with anyone interested.
Culprits (non-exhaustive list)
time.After
andtime.Sleep
really slows the tests down and leads to inconsistent/flaky tests. For instance this recent issue Flaky TestExecQueue_Stop #2013.default
case withtime.Sleep
defeats its purpose by introducing busy waiting instead, which is a very different pattern: L142Target execution time
A good first target would be 5s to 10s total run time for all unit-tests.
Current execution time
So far this is what I have on local:
Total run time: 1507.47 seconds (approximately 25 minutes and 7 seconds)
The text was updated successfully, but these errors were encountered: