Merged
Conversation
This test was downloading from https://www.example.com and https://www.iana.org but something funny seems to have happened to the JVM CA certificates on Github actions. Pointing to a site we control, skip.dev, ensures that we'll be in charge of any weirdness in changing certificate authorities.
`testGetTasks` assumed that the task would remain pending long enough to `await session.allTasks` and then `await session.tasks`, but the task might fail or succeed faster than that. I split the test into `testGetTasks` which only tests `session.tasks`, and `testGetAllTasks` which only tests `session.allTasks`, minimizing the likelihood of race conditions.
Poll for success in a loop for up to two seconds before failing
701ccd3 to
719d01c
Compare
Contributor
Author
|
CI passes! 💪 |
Member
|
Great, thanks! These network tests have been the cause of flakiness in the past, and it is probably bad practice to have them run as a part of the CI for skip-foundation, but I would be nervous disabling them wholesale. So this is a good stopgap patch, and as you say, we at least have control over the domain they are trying to hit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #96
This test was downloading from https://www.example.com and https://www.iana.org but something funny seems to have happened to the JVM CA certificates on Github actions.
Pointing to a site we control, skip.dev, ensures that we'll be in charge of any weirdness in changing certificate authorities.
The CI was still failing at that point, in TestURLSession. I added some robustness enhancements to those tests, and, now, the CI passes.
Skip Pull Request Checklist:
swift test