测试无超时 [英] No timeout in tests

查看:54
本文介绍了测试无超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢在测试中使用断点来查看出了什么问题,但是测试中的30秒超时使我无法自由查看。

I like to use breakpoints inside my tests to see what's going wrong, but the 30 second timeout on the tests prevents me to look around freely.

禁用它的方法?以下操作无效:

Is there a way to disable it ? The following doesn't work :

@tag timeout: 0
test "something" do 
  assert something == 42
end


推荐答案

更新:



使用Elixir 1.1,您还可以使用-trace 选项运行测试: 混合测试--trace

With Elixir 1.1, you will also be able to run tests with the --trace option: mix test --trace. It will automatically set timeout to infinity.

–JoséValim

– José Valim


PRE Elixir 1.1:


也许尝试使用:

PRE Elixir 1.1:

Maybe try using:

ExUnit.configure(timeout: 600_000)
# or even:
ExUnit.configure(timeout: :infinity)

文档和源代码

这篇关于测试无超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆