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

Issue 182031: Speed up net_unittests by re-using one FTP test server instance. (Closed)

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

Description

Speed up net_unittests by re-using one FTP test server instance. I managed to save 30s with this change! I had to change the interface of the test server a bit. Now the credentials to be used are passed (optionally) for TestPage request, not in the ctor. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=24942

Patch Set 1 #

Patch Set 2 : add google.patch #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -79 lines) Patch
M net/url_request/url_request_unittest.h View 5 chunks +25 lines, -42 lines 3 comments Download
M net/url_request/url_request_unittest.cc View 8 chunks +39 lines, -31 lines 1 comment Download
M third_party/pyftpdlib/README.chromium View 2 chunks +3 lines, -1 line 1 comment Download
A third_party/pyftpdlib/google.patch View 1 chunk +23 lines, -0 lines 0 comments Download
M third_party/pyftpdlib/pyftpdlib/ftpserver.py View 1 chunk +3 lines, -5 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
Paweł Hajdan Jr.
11 years, 3 months ago (2009-08-31 18:29:40 UTC) #1
wtc
11 years, 3 months ago (2009-08-31 20:38:44 UTC) #2
LGTM.  It's always nice to speed up tests!

http://codereview.chromium.org/182031/diff/1001/1002
File net/url_request/url_request_unittest.cc (right):

http://codereview.chromium.org/182031/diff/1001/1002#newcode1924
Line 1924: static void SetUpTestCase() {
Where do we call SetUpTestCase() and TearDownTestCase()?

http://codereview.chromium.org/182031/diff/1001/1003
File net/url_request/url_request_unittest.h (right):

http://codereview.chromium.org/182031/diff/1001/1003#newcode266
Line 266: return GURL(scheme_ + "://" + host_name_ + ":" + port_str_ + "/" +
path);
Is there a GURL method that combines these components into
a URL?

If host_name_ may be an IP address literal, we should be
careful about IPv6 address literals, which need to be put
inside square brackets [].  This also applies to the next
constructor.

http://codereview.chromium.org/182031/diff/1001/1003#newcode270
Line 270: const std::string& user, const std::string& password) {
This is the second form in the Style Guide:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Function_Decla...

We're supposed to list one parameter on each line.

http://codereview.chromium.org/182031/diff/1001/1003#newcode274
Line 274: else
Nit: don't use else after a return statement.

http://codereview.chromium.org/182031/diff/1001/1004
File third_party/pyftpdlib/README.chromium (right):

http://codereview.chromium.org/182031/diff/1001/1004#newcode3
Line 3: Chromium-specific changes are in google.patch file.
Why don't we name the file chromium.patch?

I guess we're not going to submit this patch upstream
because it is not useful in general?  I believe your change
removes the artificial 5-second delay after a login failure.
While the 5-second delay makes it hard to try different
passwords, we don't need this protection in a ftp server
used only for testing.  Correct?

Perhaps we can submit a patch upstream in which the delay
after a login failure is a parameter rather than a hardcoded
5 seconds??

You should explain this patch in this file or in the patch
itself.

http://codereview.chromium.org/182031/diff/1001/1006
File third_party/pyftpdlib/pyftpdlib/ftpserver.py (right):

http://codereview.chromium.org/182031/diff/1001/1006#newcode2549
Line 2549: auth_failed()
Why are these changes related to re-using the same FTP
test server instance?  If not, you should describe these
changes in the CL's description.

Powered by Google App Engine
This is Rietveld 408576698