Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase timeout period of Elixir IEx.pry session

I'm trying to increase the timeout period of an IEx.pry session. Specifically, I'my pry-ing in a Phoenix framework unit test. I've added the following to the body of my test:

require IEx
IEx.pry

I looked at the IEx documentation for the pry method and it says that the first parameter is a timeout period in milliseconds. But, when I update the pry call to:

IEx.pry(60000)

... it still times out in 30 seconds. How do I increase this timeout period?

EDIT

For posterity's sake, with Elixir 1.1, you can use the --trace flag on your test command and timeout infinity will be used. For example:

$ iex -S mix test test/models/user_test.exs:37 --trace
like image 980
Elliot Larson Avatar asked Nov 28 '15 20:11

Elliot Larson


1 Answers

The timeout is due to ExUnit, not IEx.pry in itself, see No timeout in tests

ExUnit.configure(timeout: :infinity)

like image 142
Kernael Avatar answered Oct 20 '22 13:10

Kernael