MCPcopy
hub / github.com/golang-migrate/migrate / ParallelTest

Function ParallelTest

dktesting/dktesting.go:44–61  ·  view source on GitHub ↗

ParallelTest runs Docker tests in parallel

(t *testing.T, specs []ContainerSpec,
	testFunc func(*testing.T, dktest.ContainerInfo))

Source from the content-addressed store, hash-verified

42
43// ParallelTest runs Docker tests in parallel
44func ParallelTest(t *testing.T, specs []ContainerSpec,
45 testFunc func(*testing.T, dktest.ContainerInfo)) {
46
47 for i, spec := range specs {
48 spec := spec // capture range variable, see https://goo.gl/60w3p2
49
50 // Only test against one version in short mode
51 // TODO: order is random, maybe always pick first version instead?
52 if i > 0 && testing.Short() {
53 t.Logf("Skipping %v in short mode", spec.ImageName)
54 } else {
55 t.Run(spec.ImageName, func(t *testing.T) {
56 t.Parallel()
57 dktest.Run(t, spec.ImageName, spec.Options, testFunc)
58 })
59 }
60 }
61}

Callers 15

testFunction · 0.92
testMigrateFunction · 0.92
testWithAuthFunction · 0.92
testLockWorksFunction · 0.92
TestTransactionFunction · 0.92
TestFunction · 0.92
TestMigrateFunction · 0.92
TestMalformedFunction · 0.92
TestFunction · 0.92
TestMigrateFunction · 0.92
TestMigrateLockTableFunction · 0.92
TestMultipleStatementsFunction · 0.92

Calls 1

RunMethod · 0.65

Tested by 15

testFunction · 0.74
testMigrateFunction · 0.74
testWithAuthFunction · 0.74
testLockWorksFunction · 0.74
TestTransactionFunction · 0.74
TestFunction · 0.74
TestMigrateFunction · 0.74
TestMalformedFunction · 0.74
TestFunction · 0.74
TestMigrateFunction · 0.74
TestMigrateLockTableFunction · 0.74
TestMultipleStatementsFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…