Skip to content

Use XCTest's async waiting functionality instead of a hand-rolled method #309

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

Merged
merged 1 commit into from
Apr 13, 2016

Conversation

briancroom
Copy link
Contributor

The tests for NSNotificationQueue predate the introduction of swift-corelibs-xctest's own API for asynchronous testing, and instead use a private method in the test case for spinning the run loop and waiting for an event to have occurred. It would be nice to migrate to the built-in XCTest functionality for this.

I have done my best to stress-test the test suite on my machine in both OSX and Linux environments and haven't encountered a single failure, however I do still have a slight concern that this could re-introduce test flakiness because it remove the explicit locking added by @phausler in 735d33b. If it turns out to be problematic, I would consider it to be a shortcoming in XCTest, though, and would like to see it fixed there.

@parkera
Copy link
Contributor

parkera commented Apr 13, 2016

@swift-ci please test

@parkera
Copy link
Contributor

parkera commented Apr 13, 2016

Everything should be in place for this right?

@briancroom
Copy link
Contributor Author

@parkera Yes! Thanks to @modocache

@parkera parkera merged commit 93cd136 into swiftlang:master Apr 13, 2016
@parkera
Copy link
Contributor

parkera commented Apr 13, 2016

I'm celebrating this by using the new Squash and Merge feature.

@briancroom briancroom deleted the use-xctest-async branch April 13, 2016 23:20
atrick pushed a commit to atrick/swift-corelibs-foundation that referenced this pull request Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants