2015-01-05 19 views
6

を走った私はgo testを実行して、TIMOUTエラーを得た:テスト:長すぎる

*** Test killed with quit: ran too long (10m0s). 
FAIL call/httptest 600.050s 

タイムアウトを延長し、10分以上、それは大きくするには?

+8

あなたは '-timeout'引数を使用することができます。 http://stackoverflow.com/questions/24929790/how-to-set-the-go-timeout-flag-on-go-testを参照してください。 –

答えて

10

使用go test -timeout <duration>、例えば:

$ go test -timeout 20m 

the docsから:

Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".