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

Issue 9963048: Add test for testing Socket close/error while sending response to HttpClient from HttpServer. (Closed)

Created:
8 years, 8 months ago by Anders Johnsen
Modified:
8 years, 8 months ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add test for testing Socket close/error while sending response to HttpClient from HttpServer. Committed: https://code.google.com/p/dart/source/detail?r=6087

Patch Set 1 #

Total comments: 8

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -3 lines) Patch
A tests/standalone/src/io/HttpServerSocketTest.dart View 1 2 1 chunk +213 lines, -0 lines 0 comments Download
M tests/standalone/standalone.status View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M tests/standalone/standalone-leg.status View 1 2 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Anders Johnsen
Also changed Timeout to Skip for another test, until fixed.
8 years, 8 months ago (2012-04-02 09:22:09 UTC) #1
Søren Gjesse
lgtm LGTM! This is a great way of testing all kinds of error situations https://chromiumcodereview.appspot.com/9963048/diff/1/tests/standalone/src/io/HttpServerSocketTest.dart ...
8 years, 8 months ago (2012-04-02 10:26:29 UTC) #2
Anders Johnsen
8 years, 8 months ago (2012-04-02 10:40:31 UTC) #3
Committing.

https://chromiumcodereview.appspot.com/9963048/diff/1/tests/standalone/src/io...
File tests/standalone/src/io/HttpServerSocketTest.dart (right):

https://chromiumcodereview.appspot.com/9963048/diff/1/tests/standalone/src/io...
tests/standalone/src/io/HttpServerSocketTest.dart:55: class SocketImpl
implements Socket {
On 2012/04/02 10:26:29, Søren Gjesse wrote:
> Maybe call this ScoketMock. Same for ServerSocketImpl.

Done.

https://chromiumcodereview.appspot.com/9963048/diff/1/tests/standalone/src/io...
tests/standalone/src/io/HttpServerSocketTest.dart:74: if (asError) _onError(new
Exception("Socket closed unexpected"));
On 2012/04/02 10:26:29, Søren Gjesse wrote:
> Please format with {}s

Done.

https://chromiumcodereview.appspot.com/9963048/diff/1/tests/standalone/src/io...
tests/standalone/src/io/HttpServerSocketTest.dart:84: 
On 2012/04/02 10:26:29, Søren Gjesse wrote:
> Maybe add an implementation of writeList which throws an exception as it is
not
> currently expected to be called. It will of cause give an method not found
> exception already.

There's quite a few methods that I have not implemented, so my "style" here is
to rely on method not found exceptions.

https://chromiumcodereview.appspot.com/9963048/diff/1/tests/standalone/src/io...
tests/standalone/src/io/HttpServerSocketTest.dart:170: HttpServer server = new
HttpServer();
On 2012/04/02 10:26:29, Søren Gjesse wrote:
> You should be able to have the http server outside testContent, and re-use the
> same server for several requests. Not sure if it add much to the test though.

I agree, let's take it out. It may expose some interesting issues!

Powered by Google App Engine
This is Rietveld 408576698