harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r381337 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLConnectionTest.java
Date Mon, 27 Feb 2006 13:20:56 GMT
Author: tellison
Date: Mon Feb 27 05:20:48 2006
New Revision: 381337

URL: http://svn.apache.org/viewcvs?rev=381337&view=rev
Log:
Apply patch HARMONY-138 (2 regression tests for URLConnection class should be network independent)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLConnectionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLConnectionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLConnectionTest.java?rev=381337&r1=381336&r2=381337&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLConnectionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/URLConnectionTest.java
Mon Feb 27 05:20:48 2006
@@ -29,9 +29,13 @@
 	 */
 	public void test_setUseCachesZ() throws MalformedURLException, IOException {
 		// Regression for HARMONY-71
-		URLConnection u = new URL("http://www.apache.org").openConnection();
-		u.connect(); // TODO change to use local server
+		URLConnection u = new URLConnection(new URL("http://www.apache.org")) {
+		    public void connect() {
+		        connected = true;
+		    }
+		};
 
+		u.connect();
 		try {
 			u.setUseCaches(true);
 			fail("Assert 0: expected an IllegalStateException");
@@ -46,8 +50,13 @@
 	public void test_setAllowUserInteractionZ() throws MalformedURLException,
 			IOException {
 		// Regression for HARMONY-72
-		URLConnection u = new URL("http://www.apache.org").openConnection();
-		u.connect(); // TODO change to use local server
+		URLConnection u = new URLConnection(new URL("http://www.apache.org")) {
+		    public void connect() {
+		        connected = true;
+		    }
+		};
+
+		u.connect();
 		try {
 			u.setAllowUserInteraction(false);
 			fail("Assert 0: expected an IllegalStateException");



Mime
View raw message