Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- go test -parallel=1 -race -v parallel_test.go
- === RUN TestOne
- === PAUSE TestOne
- === RUN TestTwo
- === PAUSE TestTwo
- === CONT TestTwo
- === CONT TestOne
- --- PASS: TestTwo (0.00s)
- --- PASS: TestOne (0.00s)
- PASS
- ok command-line-arguments 1.020s
- go test -parallel=2 -race -v parallel_test.go
- === RUN TestOne
- === PAUSE TestOne
- === RUN TestTwo
- === PAUSE TestTwo
- === CONT TestTwo
- === CONT TestOne
- ==================
- WARNING: DATA RACE
- Write at 0x00c420088240 by goroutine 6:
- runtime.mapassign_faststr()
- /Users/vasko/code/go/src/runtime/hashmap_fast.go:534 +0x0
- command-line-arguments.TestOne()
- /Users/vasko/tmp/parallel_test.go:9 +0x91
- testing.tRunner()
- /Users/vasko/code/go/src/testing/testing.go:769 +0x169
- Previous write at 0x00c420088240 by goroutine 7:
- runtime.mapassign_faststr()
- /Users/vasko/code/go/src/runtime/hashmap_fast.go:534 +0x0
- command-line-arguments.TestTwo()
- /Users/vasko/tmp/parallel_test.go:20 +0x91
- testing.tRunner()
- /Users/vasko/code/go/src/testing/testing.go:769 +0x169
- Goroutine 6 (running) created at:
- testing.(*T).Run()
- /Users/vasko/code/go/src/testing/testing.go:812 +0x535
- testing.runTests.func1()
- /Users/vasko/code/go/src/testing/testing.go:1036 +0xa4
- testing.tRunner()
- /Users/vasko/code/go/src/testing/testing.go:769 +0x169
- testing.runTests()
- /Users/vasko/code/go/src/testing/testing.go:1034 +0x4c7
- testing.(*M).Run()
- /Users/vasko/code/go/src/testing/testing.go:954 +0x271
- main.main()
- b001/_testmain.go:44 +0x228
- Goroutine 7 (running) created at:
- testing.(*T).Run()
- /Users/vasko/code/go/src/testing/testing.go:812 +0x535
- testing.runTests.func1()
- /Users/vasko/code/go/src/testing/testing.go:1036 +0xa4
- testing.tRunner()
- /Users/vasko/code/go/src/testing/testing.go:769 +0x169
- testing.runTests()
- /Users/vasko/code/go/src/testing/testing.go:1034 +0x4c7
- testing.(*M).Run()
- /Users/vasko/code/go/src/testing/testing.go:954 +0x271
- main.main()
- b001/_testmain.go:44 +0x228
- ==================
- ==================
- WARNING: DATA RACE
- Write at 0x00c4200c2088 by goroutine 6:
- command-line-arguments.TestOne()
- /Users/vasko/tmp/parallel_test.go:9 +0xa4
- testing.tRunner()
- /Users/vasko/code/go/src/testing/testing.go:769 +0x169
- Previous write at 0x00c4200c2088 by goroutine 7:
- command-line-arguments.TestTwo()
- /Users/vasko/tmp/parallel_test.go:20 +0xa4
- testing.tRunner()
- /Users/vasko/code/go/src/testing/testing.go:769 +0x169
- Goroutine 6 (running) created at:
- testing.(*T).Run()
- /Users/vasko/code/go/src/testing/testing.go:812 +0x535
- testing.runTests.func1()
- /Users/vasko/code/go/src/testing/testing.go:1036 +0xa4
- testing.tRunner()
- /Users/vasko/code/go/src/testing/testing.go:769 +0x169
- testing.runTests()
- /Users/vasko/code/go/src/testing/testing.go:1034 +0x4c7
- testing.(*M).Run()
- /Users/vasko/code/go/src/testing/testing.go:954 +0x271
- main.main()
- b001/_testmain.go:44 +0x228
- Goroutine 7 (running) created at:
- testing.(*T).Run()
- /Users/vasko/code/go/src/testing/testing.go:812 +0x535
- testing.runTests.func1()
- /Users/vasko/code/go/src/testing/testing.go:1036 +0xa4
- testing.tRunner()
- /Users/vasko/code/go/src/testing/testing.go:769 +0x169
- testing.runTests()
- /Users/vasko/code/go/src/testing/testing.go:1034 +0x4c7
- testing.(*M).Run()
- /Users/vasko/code/go/src/testing/testing.go:954 +0x271
- main.main()
- b001/_testmain.go:44 +0x228
- ==================
- --- FAIL: TestOne (0.00s)
- testing.go:722: race detected during execution of test
- --- FAIL: TestTwo (0.00s)
- FAIL
- exit status 1
- FAIL command-line-arguments 0.018s
Add Comment
Please, Sign In to add comment