Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test killed with quit: ran too long

Tags:

I run go test and got timout error:

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

How to extend timeout and make it bigger than 10 minutes?

like image 886
Maxim Yefremov Avatar asked Jan 05 '15 11:01

Maxim Yefremov


2 Answers

Use go test -timeout <duration>, e.g.:

$ go test -timeout 20m 

The default is 10m.

From the docs:

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

like image 161
bfontaine Avatar answered Sep 18 '22 06:09

bfontaine


By default, timeout exit after 10 minutes

go test --help

-timeout d If a test binary runs longer than duration d, panic. If d is 0, the timeout is disabled. The default is 10 minutes (10m).

like image 21
MOHL-CLAUZADE Yannick Avatar answered Sep 22 '22 06:09

MOHL-CLAUZADE Yannick