No timeout in tests

大城市里の小女人 提交于 2019-12-18 18:54:41

问题


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

回答1:


UPDATE:

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

PRE Elixir 1.1:

Maybe try using:

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

Docu and source code



来源:https://stackoverflow.com/questions/31321150/no-timeout-in-tests

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!