Closed
Description
tparallel finds inappropriate or inefficient usage of t.Parallel()
method in Go test codes.
It detects the following:
- insufficient parallelization:
t.Parallel()
is called in either a top-level test function or a sub-test function only - inappropriate teardown process: Although
t.Parallel()
is called in the sub-test function, it is post-processed bydefer
instead oft.Cleanup()
Particularly in tests that access the database, the communication time to the database takes up a large portion of the test time, so we can reduce the test time by executing the test code in parallel appropriately.