I was looking into what was making the example tests so slow (some like
the periodic job enqueuer one often take 3 seconds to run), and it turns
out that the lion's share of it is from from service start up jitter.
Example tests aren't in the main river package (they're in
river_test) so they didn't previously have a way of interacting with
the client in such a way as to disable stagger. Luckily, we do have a
way now. Take advantage of the recently introduced TestOnly client
property from #414 to make all the examples faster.
I was looking into what was making the example tests so slow (some like the periodic job enqueuer one often take 3 seconds to run), and it turns out that the lion's share of it is from from service start up jitter.
Example tests aren't in the main
river
package (they're inriver_test
) so they didn't previously have a way of interacting with the client in such a way as to disable stagger. Luckily, we do have a way now. Take advantage of the recently introducedTestOnly
client property from #414 to make all the examples faster.