gpt4 book ai didi

go - 测试因退出 : ran too long 而终止

转载 作者:IT老高 更新时间:2023-10-28 13:07:00 27 4
gpt4 key购买 nike

我运行 go test 并得到超时错误:

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

如何延长超时时间并使其大于 10 分钟?

最佳答案

使用 go test -timeout <duration> ,例如:

$ go test -timeout 20m

默认为 10m。

来自 the docs :

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

关于go - 测试因退出 : ran too long 而终止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27778280/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com