New issue
Advanced search Search tips

Issue 609496 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

DataReductionProxyTestContext::Builder is using a real HostResolverImpl

Project Member Reported by mmenke@chromium.org, May 5 2016

Issue description

It should be using a MockHostResolver to avoid making real DNS requests.  Overriding the HostResolverProc works as well, but can result in a leak (It uses a worker pool).  There's currently a suppression for the leak, but I'm removing it (Reworking the leaking code, but it will still leak, MockHostResolver doesn't have that issue).

I'd suggest just switching the class over to using TestURLRequestContext, to avoid this issue.  For now, I'm just going to switch it over to the MockHostResolver so I'm not blocking on it.
 

Comment 1 by bengr@chromium.org, May 12 2016

Thanks! Let us know if you need any help.

Comment 2 by mmenke@chromium.org, Jul 27 2016

Owner: ----
Status: Available (was: Assigned)
Forgot about this.  I ended up using another approach to work around the issue to get my code change through.

Looks like DataReductionProxyTestContext::Builder is indeed used in tests that make network requests.  Those requests correctly use mock sockets...But I believe they use real DNS lookups, like DataReductionProxyInterceptorEndToEndTest::ResponseWithoutRetry, which I think depends on foo.com having a real DNS entry, which is a problem.

Comment 3 by bengr@chromium.org, Oct 28 2016

Owner: rajendrant@chromium.org
Status: Assigned (was: Available)
Status: Fixed (was: Assigned)
DataReductionProxyInterceptorEndToEndTest and DataReductionProxyBypassStatsTest already use TestURLRequestContext which uses MockHostResolver for resolving. No changes needed.

Sign in to add a comment