Skip to content

Enable URLSesssion tests #1042

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
Jun 22, 2017

Conversation

pushkarnk
Copy link
Member

Enabling the remaining URLSession tests. These had been disabled following some CI failures that we couldn't reproduce locally. Late last month we enabled the tests with completion handlers with some extra diagnostic messages. It looks like the CI has been stable for a while (fingers crossed!). This PR enables the remaining tests that use delegates.

@pushkarnk
Copy link
Member Author

@swift-ci please test

@pushkarnk pushkarnk changed the title Re-enable URLSesssion tests Enable URLSesssion tests Jun 14, 2017
@ianpartridge
Copy link
Contributor

TestFoundation/TestNSURLSession.swift:264: error: TestURLSession.test_finishTaskAndInvalidate : Asynchronous wait failed - Exceeded timeout of 12.0 seconds, with unfulfilled expectations: URLSession wasn't invalidated

@pushkarnk
Copy link
Member Author

pushkarnk commented Jun 15, 2017

I'm looking into the failure. Doesn't look straightforward.

@pushkarnk
Copy link
Member Author

Created #1049 for the failure

@pushkarnk pushkarnk force-pushed the enable-urlsession-tests branch from f749d6f to 2522233 Compare June 20, 2017 09:56
@pushkarnk
Copy link
Member Author

@swift-ci please test

1 similar comment
@pushkarnk
Copy link
Member Author

@swift-ci please test

@pushkarnk
Copy link
Member Author

One of those intermittent failures. The completion handler was called with a non-nil error which translated to URLError(_nsError: The operation could not be completed). This seems to be a very general error type - we have no info on what actually went wrong.

@pushkarnk
Copy link
Member Author

I'm running the test one more time.

@swift-ci please test

@pushkarnk
Copy link
Member Author

pushkarnk commented Jun 22, 2017

There are two types of URLSession tests - ones that use the completion handler and others that use delegates. With the tests that use delegates disabled, we seem to be doing good. However, after enabling those, the completion handler tests seem to be intermittently failing. In a debugging session today I realised that there can be some inter-test dependencies because though we are creating a new server for each test, we aren't making sure the previous server has completed and shutdown. There is a need to comprehend things better here. I am putting this PR on hold until then. I am merging this anyway but will continue investigation.

@swift-ci swift-ci merged commit 8863ea2 into swiftlang:master Jun 22, 2017
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