File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
pkgs/http_client_conformance_tests/lib/src Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ void testAbort(
9797 throwsA (
9898 isA <ClientException >().having ((e) => e.uri, 'uri' , serverUrl)));
9999 expect (i, 1000 );
100- });
100+ }, skip : canStreamResponseBody ? false : 'does not stream response bodies' );
101101
102102 test ('after streaming response' , () async {
103103 final request = Request ('GET' , serverUrl);
@@ -106,5 +106,19 @@ void testAbort(
106106 await response.stream.drain <void >();
107107 // Trigger abort, should have no effect.
108108 });
109+
110+ test ('after response, client still useable' , () async {
111+ final request = Request ('GET' , serverUrl);
112+
113+ final abortResponse = await client.send (request);
114+ // TODO: Trigger abort
115+ try {
116+ await abortResponse.stream.drain <void >();
117+ } on ClientException {}
118+
119+ final response = await client.get (serverUrl);
120+ expect (response.statusCode, 200 );
121+ expect (response.body, endsWith ('10000\n ' ));
122+ });
109123 });
110124}
You can’t perform that action at this time.
0 commit comments