Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Issue 149159: Refactoring in client_socket_pool_base_unittest.cc. (Closed)

Created:
11 years, 5 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Refactoring in client_socket_pool_base_unittest.cc. This is a preparation to add tests for limiting total number of sockets. TEST=Covered by net_unittests. http://crbug.com/15093 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=19975

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -113 lines) Patch
M net/socket/client_socket_pool_base_unittest.cc View 17 chunks +84 lines, -113 lines 1 comment Download

Messages

Total messages: 5 (0 generated)
Paweł Hajdan Jr.
I plan to refactor it even further in the future, to have an array of ...
11 years, 5 months ago (2009-07-02 23:32:54 UTC) #1
Paweł Hajdan Jr.
ping!
11 years, 5 months ago (2009-07-06 16:34:56 UTC) #2
willchan no longer on Chromium
This is a good cleanup. Be careful with your suggested follow-up refactor. I think you'll ...
11 years, 5 months ago (2009-07-06 17:11:03 UTC) #3
Paweł Hajdan Jr.
On 2009/07/06 17:11:03, willchan wrote: > This is a good cleanup. Be careful with your ...
11 years, 5 months ago (2009-07-06 20:17:38 UTC) #4
willchan no longer on Chromium
11 years, 5 months ago (2009-07-06 21:38:04 UTC) #5
On 2009/07/06 20:17:38, Paweł Hajdan Jr. wrote:
> On 2009/07/06 17:11:03, willchan wrote:
> > This is a good cleanup.  Be careful with your suggested follow-up refactor. 
I
> > think you'll be fine as long as you only refactor a few specific tests into
> that
> > format, but there are a few pitfalls with data driven tests (hinted at
> >
>
http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide#Value_Parame...
> > and discussed more fully in internal Google wikis).
> 
> Do you have pointers to the specific wiki resources about the pitfalls? I
tried
> searching moma, but got nothing related.
> 
> > http://codereview.chromium.org/149159/diff/1/2
> > File net/socket/client_socket_pool_base_unittest.cc (right):
> > 
> > http://codereview.chromium.org/149159/diff/1/2#newcode297
> > Line 297: void CreateConnections(scoped_ptr<TestSocketRequest>* reqs, size_t
> > count) {
> > It strikes me as odd that you have |count| as a variable, since you don't
seem
> > to use it everywhere.  Notably, this code does not seem to handle the case
> when
> > count < kMaxSocketsPerGroup, or count != (kMaxSocketsPerGroup +
> > kNumPendingRequests).
> 
> That's right. I just moved the current logic. I plan to make it more flexible
in
> the next round of refactoring.
> 
> I noticed you didn't say "LGTM" but "It's a good cleanup", but I committed
just
> few seconds earlier. If you have any comments, I'd do them in the next (and I
> think final) round of refactoring here.

That's fine.  I was mainly waiting for the answer you provided.

Powered by Google App Engine
This is Rietveld 408576698