summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-05-06 13:58:52 -0700
committerBrian Carlstrom <bdc@google.com>2013-05-06 13:58:52 -0700
commitd4781a20611fd0424aede028c139bfdbaea5677b (patch)
treea6af324fd8a4848bd858c482ae75330ec6242eb1
parentf7e1ba4804f7365e6ab47a34e019532b428b1546 (diff)
downloadlibcore-d4781a20611fd0424aede028c139bfdbaea5677b.zip
libcore-d4781a20611fd0424aede028c139bfdbaea5677b.tar.gz
libcore-d4781a20611fd0424aede028c139bfdbaea5677b.tar.bz2
Make it clearer that a new MockWebServer is created for each test run
Change-Id: Ib3ce11f42d19688fe00b7d057eece25567fccea2
-rw-r--r--luni/src/test/java/libcore/java/net/URLConnectionTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/luni/src/test/java/libcore/java/net/URLConnectionTest.java b/luni/src/test/java/libcore/java/net/URLConnectionTest.java
index ac38eb8..1b4279f 100644
--- a/luni/src/test/java/libcore/java/net/URLConnectionTest.java
+++ b/luni/src/test/java/libcore/java/net/URLConnectionTest.java
@@ -80,12 +80,13 @@ import static com.google.mockwebserver.SocketPolicy.SHUTDOWN_INPUT_AT_END;
import static com.google.mockwebserver.SocketPolicy.SHUTDOWN_OUTPUT_AT_END;
public final class URLConnectionTest extends TestCase {
- private MockWebServer server = new MockWebServer();
+ private MockWebServer server;
private HttpResponseCache cache;
private String hostName;
@Override protected void setUp() throws Exception {
super.setUp();
+ server = new MockWebServer();
hostName = server.getHostName();
}
@@ -1835,7 +1836,6 @@ public final class URLConnectionTest extends TestCase {
}
public void testGetKeepAlive() throws Exception {
- MockWebServer server = new MockWebServer();
server.enqueue(new MockResponse().setBody("ABC"));
server.play();