-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add client launch retries #218
base: master
Are you sure you want to change the base?
Add client launch retries #218
Conversation
} | ||
} | ||
|
||
NSLog(@"[SBTUITestTunnel] Tunnel ready after %fs", CFAbsoluteTimeGetCurrent() - self.launchStart); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question] Why remove this? Maybe needs to be moved higher, next to the attemptLaunch
call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I will revert this back once we agree on the solution.
* @param options List of options to be passed on launch. | ||
* Valid options: | ||
* SBTUITunneledApplicationLaunchOptionResetFilesystem: delete app's filesystem sandbox | ||
* SBTUITunneledApplicationLaunchOptionDisableUITextFieldAutocomplete disables UITextField's autocomplete functionality which can lead to unexpected results when typing text. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not copy/paste here the options, will become hard to maintain. Maybe you can just say something like see method launchTunnelWithOptions for details about the options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options are listed in the twin method. I don't want to introduce discrepancies on the interface.
Could you elaborate and give some further context for the change? Is this on CI or locally on developers machines? I took a look at the last 10k test in CI and couldn't find a single case, and we're also running test concurrently (5 sims per node on a dozen of mac minis). I'm kind of unsure whether this changes could introduce other type of instabilities due to the fact that we're retrying only on just one side of the bridge. Did you investigate more in depth the reasons for your launch connection issues? Partially related, UI tests are inherently unstable as there are many issues that can cause something to break and it is generally advisable to have an additional component that ensures that tests are automatically retried. Just as an example we built Mendoza which automatically retries our tests covering any type of instability, launch or test implementation related. |
Did you try disabling IPC and use HTTP tunneling? Does that make any difference? https://github.com/Subito-it/SBTUITestTunnel/blob/master/Documentation/Setup.md#tunneling-mode? |
@tcamin This comes out as a solution for launch exceptions on
I understand that the ping above fails. Unfortunately I wasn't able to narrow down the issue any further so I anticipate some sort of race condition (perhaps more than a single ping should be performed?) Currently, there is no way to reliably recover from this error (while a retry helps in our case) other than restarting the test, which has some overhead I'd like to avoid. Using client's delegate to capture the issue is too late.
I saw this issue #127 and switching to HTTP solves it but it is not possible in our case. |
I tried to manually replicate the exception path the first time
|
Thanks. I'll have a look into this, as well as into unit testing the retries. |
Thanks! It would be great if you could add an integration test, similarly to the other ones that have already been written for the library. |
Add client-side launch retries. This is helpful to overcome instability of IPC based approach in case of running multiple tests in parallel.