-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Parallelize package level tests in high-cost packages.
This commit adds `t.Parallel()` calls to the beginning of many tests across several Go packages in OPA. The slowest packages (taking ~10s or more) have been instrumented where possible as a proof-of-concept. On a machine with many cores, the tests now will complete as fast as the slowest test per package, instead of the sum of all the tests in a particular package. Background: Go runs tests across different packages in parallel, but will run all tests *within* a package sequentially. By adding `t.Parallel()` to tests that support it, we are telling the test-runner that it is safe to run that test in parallel with any other tests. Signed-off-by: Philip Conrad <[email protected]>
- Loading branch information
1 parent
4a958e0
commit c2e0bcd
Showing
7 changed files
with
513 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.