harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r506540 - /harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java
Date Mon, 12 Feb 2007 17:14:22 GMT
Author: tellison
Date: Mon Feb 12 09:14:20 2007
New Revision: 506540

URL: http://svn.apache.org/viewvc?view=rev&rev=506540
Log:
Apply patch HARMONY-3157 ([classlib][nio]it is not necessary to use PortManager to create
a DatagramSocket in DatagramChannelTest)

Modified:
    harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java?view=diff&rev=506540&r1=506539&r2=506540
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java
Mon Feb 12 09:14:20 2007
@@ -76,10 +76,8 @@
                 Support_PortManager.getNextPort());
         this.localAddr2 = new InetSocketAddress("127.0.0.1",
                 Support_PortManager.getNextPort());
-        this.datagramSocket1 = new DatagramSocket(Support_PortManager
-                .getNextPort());
-        this.datagramSocket2 = new DatagramSocket(Support_PortManager
-                .getNextPort());
+        this.datagramSocket1 = new DatagramSocket(0);
+        this.datagramSocket2 = new DatagramSocket(0);
     }
 
     protected void tearDown() throws Exception {
@@ -1284,8 +1282,7 @@
 
     public void testReceiveSend_Normal_S2S() throws Exception {
         String msg = "normal string in testReceiveSend_Normal_S2S";
-        this.datagramSocket1 = new DatagramSocket(Support_PortManager
-                .getNextPort());
+        this.datagramSocket1 = new DatagramSocket(0);
         DatagramPacket rdp = new DatagramPacket(msg.getBytes(), msg.length(),
                 localAddr2);
         datagramSocket2 = new DatagramSocket(localAddr2.getPort());
@@ -1341,8 +1338,7 @@
 
     public void testReceiveSend_Empty_S2S() throws Exception {
         String msg = "";
-        this.datagramSocket1 = new DatagramSocket(Support_PortManager
-                .getNextPort());
+        this.datagramSocket1 = new DatagramSocket(0);
         DatagramPacket rdp = new DatagramPacket(msg.getBytes(), msg.length(),
                 localAddr2);
         datagramSocket2 = new DatagramSocket(localAddr2.getPort());
@@ -1418,8 +1414,7 @@
 
     private void sendByDatagramSocket(String data, InetSocketAddress address)
             throws Exception {
-        this.datagramSocket1 = new DatagramSocket(Support_PortManager
-                .getNextPort());
+        this.datagramSocket1 = new DatagramSocket(0);
         DatagramPacket rdp = new DatagramPacket(data.getBytes(), data.length(),
                 address);
         this.datagramSocket1.send(rdp);



Mime
View raw message