harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r520801 - in /harmony/enhanced/classlib/trunk/modules/luni: make/exclude.common src/test/java/tests/api/java/net/ExcludedProxyTest.java src/test/java/tests/api/java/net/SocketImplTest.java
Date Wed, 21 Mar 2007 08:36:02 GMT
Author: apetrenko
Date: Wed Mar 21 01:36:01 2007
New Revision: 520801

URL: http://svn.apache.org/viewvc?view=rev&rev=520801
Log:
Patch for HARMONY-3435 "[classlib][luni]move out src/test/java/tests/api/java/net/SocketImplTest.java"

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/make/exclude.common
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/ExcludedProxyTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketImplTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/make/exclude.common?view=diff&rev=520801&r1=520800&r2=520801
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/make/exclude.common (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/make/exclude.common Wed Mar 21 01:36:01 2007
@@ -1,5 +1,4 @@
 tests/api/java/net/MulticastSocketTest.java
-tests/api/java/net/SocketImplTest.java
 tests/api/java/net/URLClassLoaderTest.java
 tests/api/java/net/URLConnectionTest.java
 tests/api/java/net/URLTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/ExcludedProxyTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/ExcludedProxyTest.java?view=diff&rev=520801&r1=520800&r2=520801
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/ExcludedProxyTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/ExcludedProxyTest.java
Wed Mar 21 01:36:01 2007
@@ -20,6 +20,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.net.Socket;
 import java.net.URL;
 import java.net.URLConnection;
 
@@ -103,6 +104,46 @@
                 response += new String(b4, 0, count);
             assertTrue("Response to POST method invalid", response
                     .equals(posted4));
+        } finally {
+            System.setProperties(null);
+        }
+    }
+    
+    /**
+     * @tests java.net.SocketImpl#SocketImpl()
+     */
+    public void test_Constructor() {
+        try {
+            try {
+                System.setProperty("socksProxyHost",
+                        Support_Configuration.SocksServerTestHost);
+                System.setProperty("socksProxyPort", String
+                        .valueOf(Support_Configuration.SocksServerTestPort));
+                Socket s = new Socket(Support_Configuration.HomeAddress, 80);
+                OutputStream os = s.getOutputStream();
+                os.write("GET / HTTP/1.0\r\n\r\n".getBytes());
+                s.getInputStream();
+            } catch (IOException e) {
+                fail("Could not open socket: "
+                        + Support_Configuration.HomeAddress + " " + e);
+            }
+            boolean exception = false;
+            try {
+                System.setProperty("socksProxyHost",
+                        Support_Configuration.SocksServerTestHost);
+                System
+                        .setProperty(
+                                "socksProxyPort",
+                                String
+                                        .valueOf(Support_Configuration.SocksServerTestPort
+ 1));
+                Socket s = new Socket(Support_Configuration.HomeAddress, 80);
+                OutputStream os = s.getOutputStream();
+                os.write("GET / HTTP/1.0\r\n\r\n".getBytes());
+                s.getInputStream();
+            } catch (IOException e) {
+                exception = true;
+            }
+            assertTrue("Exception should have been thrown", exception);
         } finally {
             System.setProperties(null);
         }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketImplTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketImplTest.java?view=diff&rev=520801&r1=520800&r2=520801
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketImplTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketImplTest.java
Wed Mar 21 01:36:01 2007
@@ -22,54 +22,12 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.InetAddress;
-import java.net.Socket;
 import java.net.SocketAddress;
 import java.net.SocketException;
 import java.net.SocketImpl;
 
-import tests.support.Support_Configuration;
-
 public class SocketImplTest extends junit.framework.TestCase {
 
-	/**
-	 * @tests java.net.SocketImpl#SocketImpl()
-	 */
-	public void test_Constructor() {
-		try {
-			try {
-				System.setProperty("socksProxyHost",
-						Support_Configuration.SocksServerTestHost);
-				System.setProperty("socksProxyPort", String
-						.valueOf(Support_Configuration.SocksServerTestPort));
-				Socket s = new Socket(Support_Configuration.HomeAddress, 80);
-				OutputStream os = s.getOutputStream();
-				os.write("GET / HTTP/1.0\r\n\r\n".getBytes());
-				s.getInputStream();
-			} catch (IOException e) {
-				fail("Could not open socket: "
-						+ Support_Configuration.HomeAddress + " " + e);
-			}
-			boolean exception = false;
-			try {
-				System.setProperty("socksProxyHost",
-						Support_Configuration.SocksServerTestHost);
-				System
-						.setProperty(
-								"socksProxyPort",
-								String
-										.valueOf(Support_Configuration.SocksServerTestPort + 1));
-				Socket s = new Socket(Support_Configuration.HomeAddress, 80);
-				OutputStream os = s.getOutputStream();
-				os.write("GET / HTTP/1.0\r\n\r\n".getBytes());
-				s.getInputStream();
-			} catch (IOException e) {
-				exception = true;
-			}
-			assertTrue("Exception should have been thrown", exception);
-		} finally {
-			System.setProperties(null);
-		}
-	}
 	
     public void test_Constructor_fd() throws Exception {
         // regression test for Harmony-1117



Mime
View raw message