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

Unified Diff: components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLConnectionTest.java

Issue 2172633002: Revert of Fix CronetHttpURLConnectionTest#testServerHangsUp flake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/cronet/android/test/native_test_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLConnectionTest.java
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLConnectionTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLConnectionTest.java
index 6dfaa2aa9341130647d5442998cd4c1faaa6aaf2..bc8ef9873c3d469884bf32c6cd2cc343154c5dc0 100644
--- a/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLConnectionTest.java
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLConnectionTest.java
@@ -846,8 +846,17 @@
@Feature({"Cronet"})
@CompareDefaultWithCronet
public void testServerHangsUp() throws Exception {
- URL url = new URL(NativeTestServer.getExabyteResponseURL());
+ URL url = new URL(NativeTestServer.getEchoBodyURL());
final HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ // Make the server echo a large request body, so it exceeds the internal
+ // read buffer.
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ byte[] largeData = TestUtil.getLargeData();
+ connection.setFixedLengthStreamingMode(largeData.length);
+ OutputStream out = connection.getOutputStream();
+ out.write(largeData);
+
InputStream in = connection.getInputStream();
// Read one byte and shut down the server.
assertTrue(in.read() != 1);
« no previous file with comments | « no previous file | components/cronet/android/test/native_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698