-
-
Notifications
You must be signed in to change notification settings - Fork 601
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
Observation Delay Causes Issues #273
Comments
I did a bit of swizzling to get a better sense of the observers in play relating to #271 and found the following:
XCTestLogThis one is responsible for writing test output to stdout. If it doesn't get added as an observer, there is almost no output. It is the first observer added to the I'm confused how #271 was a timing issue as Quick Test FailureThe failing test in Quick/Quick#507 is
The swift side of TheorySomehow I think |
I think I have this backwards. Maybe the root cause is the same as #271 - no output. If I prevent
If xcodebuild is also using this
So, perhaps the I'll do some experiments to see if there are other hooks we can use to get |
OK, this is ugly, but it works. Moving the I don't really know what I'm doing and don't like the idea of swizzling since it's so fragile. Does anyone know of any other XCTest framework hooks that we can move this |
@briancroom: Would all this be resolved if we just removed |
@jeffh I tried that first, but the |
Ah I see, sadly I don't think so. There's not an explicit separation in C. 😦 |
Yeah.. unfortunately the This morning @idoru and I spent some time thinking about approaches to this issue for Cedar which was experiencing the exact same issue. The best solution we came up with is effectively the same thing that @phatblat is proposing here, with the slight adjustment that we swizzled both Regarding additional XCTest framework hooks, it is possible for spec bundles to use the |
I vote for safety-checked swizzling over requiring users to register a |
Sounds like this was fixed in #278, are we okay to close? |
Yep |
Fab! |
In #271, @paweldudek fixed a problem where registering a test observer too early causes the XCTest internal setup to perform incorrectly. This solution works, but has introduced a problem when updating Quick's Nimble version. It seems like the slight delay introduced using
dispatch_async
causes the Quick test for the number of ObjC tests performed to fail.Kif had a similar issue, check out the Quick PR for more discussion on background + possible solutions. @phatblat has a theory.
The text was updated successfully, but these errors were encountered: