Parallelize all the tests in ForAllNets (#1199)

This commit is contained in:
Elichai Turkel 2020-12-09 17:43:36 +02:00 committed by GitHub
parent 0d8f7bba40
commit 3354ac67c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,8 +18,11 @@ func ForAllNets(t *testing.T, skipPow bool, testFunc func(*testing.T, *dagconfig
for _, params := range allParams {
paramsCopy := params
paramsCopy.SkipProofOfWork = skipPow
t.Logf("Running test for %s", params.Name)
testFunc(t, &paramsCopy)
t.Run(paramsCopy.Name, func(t *testing.T) {
t.Parallel()
paramsCopy.SkipProofOfWork = skipPow
t.Logf("Running test for %s", paramsCopy.Name)
testFunc(t, &paramsCopy)
})
}
}