Skip to content

Don't call a notification expectation handler after the expectation has expired #90

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

Conversation

briancroom
Copy link
Contributor

Previously, if a notification expectation fails, either due to a waitForExpectationsWithTimeout call or because the test ends, the internal notification observer could still end up calling the expectation handler if the expected notification is fired at a later point. With this change, the notification observer weakly captures the expectation, and won't do any work if the notification is observed but the expectation isn't around anymore.

@mike-ferris
Copy link

@swift-ci please test

@modocache modocache merged commit 810024a into swiftlang:master Apr 6, 2016
@modocache
Copy link
Contributor

Good catch, thanks @briancroom!

@briancroom briancroom deleted the fix-expired-notification-expectation branch April 6, 2016 02:17
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.

3 participants