MCPcopy Create free account
hub / github.com/RainbowMango/GoExpertProgramming / parallelTest3

Function parallelTest3

source/gotest/subparallel_test.go:23–27  ·  view source on GitHub ↗

并发子测试,无实际测试工作,仅用于演示

(t *testing.T)

Source from the content-addressed store, hash-verified

21
22// 并发子测试,无实际测试工作,仅用于演示
23func parallelTest3(t *testing.T) {
24 t.Parallel()
25 time.Sleep(1 * time.Second)
26 // do some testing
27}
28
29// TestSubParallel 通过把多个子测试放到一个组中并发执行,同时多个子测试可以共享setup和tear-down
30func TestSubParallel(t *testing.T) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected