Skip to content
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

Mock redirection logic for tests #4197

Merged
merged 7 commits into from
Jul 22, 2021
Merged

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Jul 20, 2021

Fixes recent CI failures like this. Two of our tests depend on the Caltech servers, which are down for some days #4188. This PR removes the dependency and mocks out the redirection behavior.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pmeier , looks good, I'm trying to see if we could simplify things a bit :)

test/test_internet.py Outdated Show resolved Hide resolved
test/test_internet.py Outdated Show resolved Hide resolved
test/test_internet.py Outdated Show resolved Hide resolved
test/test_internet.py Outdated Show resolved Hide resolved
@pmeier pmeier requested a review from NicolasHug July 21, 2021 12:26
test/test_internet.py Outdated Show resolved Hide resolved
test/test_internet.py Outdated Show resolved Hide resolved
@NicolasHug
Copy link
Member

BTW now that these tests don't require an internet connection, we can take them away from this file and put back where they were prior to #4032 :)

@pmeier pmeier requested a review from NicolasHug July 21, 2021 14:57
Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

test/test_datasets_utils.py Outdated Show resolved Hide resolved
@pmeier pmeier merged commit 75970b6 into pytorch:master Jul 22, 2021
@pmeier pmeier deleted the mock-redirect branch July 22, 2021 06:42
facebook-github-bot pushed a commit that referenced this pull request Jul 27, 2021
Summary:
* mock out redirect behavior for testing

* revert unrelated change

* simplify

* move tests out of internet tests

* replace urls with dummys

* improve checking of mock calls

Reviewed By: fmassa

Differential Revision: D29932698

fbshipit-source-id: b7d87bc50407e7916d6f4f87bd0cbcd2a8db2214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants