Increase timeout period of Elixir IEx.pry session
Asked Answered
S

1

6

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
Slushy answered 28/11, 2015 at 20:42 Comment(3)
If @Kernael answered your question you should mark that answer as the accepted answer.Slemmer
Yeah, sorry. I think I just up-voted his answer without accepting it. Thanks for pointing that out.Slushy
No worries. Just thought you may not be aware is all.Slemmer
G
7

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

ExUnit.configure(timeout: :infinity)

Gregale answered 28/11, 2015 at 21:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.