File tree Expand file tree Collapse file tree
core/tests/coretests/src/android/net/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,6 +219,23 @@ public void testExplicitNoProxyCancelsSystemProperty() throws Exception {
219219 assertEquals ("GET /bar HTTP/1.1" , recordedRequest .getRequestLine ());
220220 }
221221
222+ // http://b/5372438
223+ public void testRetryWithProxy () throws Exception {
224+ server .enqueue (new MockResponse ()
225+ .setSocketPolicy (SocketPolicy .DISCONNECT_AT_START ));
226+ server .play ();
227+
228+ HttpClient httpProxyClient = newHttpClient ();
229+ HttpGet request = new HttpGet ("http://android.com/foo" );
230+ ProxyConfig .REQUEST_PARAMETER .configure (server , httpProxyClient , request );
231+
232+ try {
233+ httpProxyClient .execute (request );
234+ fail ();
235+ } catch (IOException expected ) {
236+ }
237+ }
238+
222239 enum ProxyConfig {
223240 PROXY_SYSTEM_PROPERTY () {
224241 @ Override void configure (MockWebServer server , HttpClient client , HttpRequest request ) {
You can’t perform that action at this time.
0 commit comments