-
Notifications
You must be signed in to change notification settings - Fork 68
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
Tests take 15 seconds to run, if run individually #121
Comments
Did you have the simulator open before you started running the test? I'm a little confused what you're asking for here: are you wondering why this takes 17.3 seconds to finish? Is this an aberration vs other test runners you've used before? When I ran this one target's unit test from Xcode, it took closer to a minute including booting the simulator. A bit more information regarding your setup, expectations, and question here would be helpful. |
Hi @dfed, thanks for your answer. After restarting my machine, seems fixed now. Maybe it was a problem with Thanks for the quick answer! |
Okey, no. I still see this issue randomly: some tests which should be running in the order of Maybe it is something to do with bazelbuild/bazel#2985 (comment) |
@acecilia do you think this is particular to BuckSample? My guess is this is a Buck issue rather than something with our config, especially if it is sporadic. The bazel issue doesn't seem related: there shouldn't be any log-running processes related to this test suite. |
I have a feeling it has to do with the simulator, but I do not know how to troubleshoot it further. I am seeing the same problem in Bazel: bazelbuild/rules_apple#607. I also managed to reproduce it in CI, but only with bazel, not with buck (in buck only locally in my machine). I agree with you, it does not seem to be a problem with your setup. The reason I opened the issue here is because this seems to be the main reference around for buck setup on ios, so I was hoping that somebody experienced this before. |
I got a bit more information. The 15 seconds delay goes away if I have the exact simulator that is going to run the tests opened in advance:
Is this expected? Is it documented somewhere? Thanks! |
This sounds pretty expected, and is why my first question was:
Simulators take awhile to boot, and they need to finish booting in order for unit test to run. I don't know of a place that this is documented, however. |
Okey, thanks @dfed. I just find 15 seconds a bit excessive for the simulator to boot, but so far seems like that’s the case. Now I know that booting it in advance fixes the problem 👍 |
An update on this: apparently the simulator in Xcode 10.2 and 10.3 adds a 10-15 seconds delay randomly when running tests. Looks like it is fixed in Xcode 11. See: bazelbuild/rules_apple#607 (and more concretely bazelbuild/rules_apple#607 (comment)) |
I did:
The result of executing those commands is as follows:
The test executes properly (it passes/fails properly), but takes 15 exact seconds to finish.
Any idea whats going on?
Thanks!
The text was updated successfully, but these errors were encountered: