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

refactor: start refactoring session resolver #807

Merged
merged 1 commit into from
Jun 8, 2022
Merged

Conversation

bassosimone
Copy link
Contributor

This diff addresses the following points of ooni/probe#2135:

  • the childResolver type is useless and we can use model.Resolver directly;
  • we should use model/mocks instead of custom fakes;
  • we should not use log.Log rather we should use model.DiscardLogger;
  • make timeLimitedLookup easier to test with a -short tests;
  • ensure timeLimitedLookup returns as soon as its context expires regardless of the child resolver;

Subsequent diffs will address more points mentioned in there.

This diff addresses the following points of ooni/probe#2135:

- [ ] the `childResolver` type is useless and we can use `model.Resolver` directly;
- [ ] we should use `model/mocks` instead of custom fakes;
- [ ] we should not use `log.Log` rather we should use `model.DiscardLogger`;
- [ ] make `timeLimitedLookup` easier to test with a `-short` tests;
- [ ] ensure `timeLimitedLookup` returns as soon as its context expires regardless of the child resolver;

Subsequent diffs will address more points mentioned in there.
@bassosimone bassosimone requested a review from hellais as a code owner June 8, 2022 11:59
@bassosimone bassosimone merged commit fe29b43 into master Jun 8, 2022
@bassosimone bassosimone deleted the issue/2135 branch June 8, 2022 12:06
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.

1 participant