[jboss-remoting-commits] JBoss Remoting SVN: r6155 - remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Sat Nov 13 11:45:35 EST 2010


Author: ron.sigal at jboss.com
Date: 2010-11-13 11:45:34 -0500 (Sat, 13 Nov 2010)
New Revision: 6155

Modified:
   remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteClassTableTestCase.java
Log:
JBREM-1256: Uses Random from RemotingRootTestBase to create unique XNIO name.

Modified: remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteClassTableTestCase.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteClassTableTestCase.java	2010-11-13 16:44:13 UTC (rev 6154)
+++ remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteClassTableTestCase.java	2010-11-13 16:45:34 UTC (rev 6155)
@@ -29,8 +29,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.util.Date;
-import java.util.Random;
 
 import org.jboss.marshalling.ByteInput;
 import org.jboss.marshalling.ByteOutput;
@@ -67,7 +65,6 @@
    private static final String RCT_INSTANCE_NAME = "rct_instancename";
    private static final String RCT_SERVICE_TYPE = "rct_servicetype";
    private static final Logger log = Logger.getLogger(RemoteClassTableTestCase.class);
-   private static int counter = Math.abs(new Random(new Date().getTime()).nextInt());
 
    @BeforeMethod
    public void setUp() {
@@ -81,8 +78,8 @@
    public void testRemoteClassTableStandalone() throws Exception {
       enter();
 
-      int idSender = counter++;
-      int idReceiver = counter++;
+      int idSender = Math.abs(random.nextInt());
+      int idReceiver = Math.abs(random.nextInt());
       ServerPackage spSender = null;
       ServerPackage spReceiver = null;
       Registration reg = null;
@@ -209,8 +206,8 @@
 //   public void testRemoteClassTableAsService() throws Exception {
 //      enter();
 //
-//      int id0 = counter++;
-//      int id1 = counter++;
+//      int id0 = Math.abs(random.nextInt());
+//      int id1 = Math.abs(random.nextInt());
 //      ServerPackage sp0 = null;
 //      ServerPackage sp1 = null;
 //      



More information about the jboss-remoting-commits mailing list