Calabash should retry to launch the app when restart fails

54 views
Skip to first unread message

Francisco Javier García Periañez

unread,
Apr 23, 2013, 8:35:08 AM4/23/13
to calabash...@googlegroups.com
While running calabash's tests on mi device (it's customized and its specifications are rather low) I usually get the following errors between scenarios, in the restart phase:

 App no longer running (RuntimeError)

After looking through the logcat I can see that this is not caused by calabash. It seems to be a memory issue when trying to start the app again.

Caused by: libcore.io.ErrnoException: bind failed: EADDRINUSE (Address already in use)
       at libcore.io.Posix.bind(Native Method)
       at libcore.io.ForwardingOs.bind(ForwardingOs.java:39)
       at libcore.io.IoBridge.bind(IoBridge.java:87)

So what I would like to add to calabash default behavior is a restart retry when a exception is raised in the launch-app command or the app_running check. 
I've added this to my tests lifecycle and it has not failed anymore. It prevents false negatives in our continuous integration server and it also doesn't slow down the tests builds.
If you like the idea I'll do a pull request with the change.


Reply all
Reply to author
Forward
0 new messages