How to run golang tests sequentially?

前端 未结 4 1032
情歌与酒
情歌与酒 2020-12-03 11:10

When I run go test, my output:

--- FAIL: TestGETSearchSuccess (0.00s)
        Location:       drivers_api_test.go:283
        Error:          No         


        
4条回答
  •  醉话见心
    2020-12-03 11:29

    For those who as I am is getting problems because of multiple concurring tests running simultaneously. I found a way to limit the maximum number of test running in parallel:

    go test -p 1
    

    With this, your test will run sequentially one by one.

    Source

提交回复
热议问题