basecamp / kamal-proxy

Lightweight proxy server for Kamal
https://kamal-deploy.org/
MIT License
754 stars 31 forks source link

Add concurrency to tests with `t.Parallel()` #37

Closed jgsheppa closed 1 week ago

jgsheppa commented 1 month ago

Motivation

The motivation of this PR is to speed up the tests using Go's t.Parallel() in each test where parallelism is allowed, which is all of them locally.

Calling t.Parallel() in each test allows the tests to be called concurrently, which leads to a faster feedback loop from tests. While this might not have a huge impact now, it could help with testing times as more tests are written.

This is a cool feature of Go and I thought it might be a helpful addition to this project, but if you've already considered this and don't want it for whatever reason - no big deal.

Further information

Definition of t.Parallel() in Go documentation