Skip to content

Commit 7b5d62a

Browse files
committed
Update abort_tests.dart
1 parent 8c0e238 commit 7b5d62a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

pkgs/http_client_conformance_tests/lib/src/abort_tests.dart

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)