Author: ron.sigal(a)jboss.com
Date: 2010-11-13 11:44:13 -0500 (Sat, 13 Nov 2010)
New Revision: 6154
Modified:
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteCallbackTestCase.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/RemoteCallbackTestCase.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteCallbackTestCase.java 2010-11-13
16:43:11 UTC (rev 6153)
+++
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteCallbackTestCase.java 2010-11-13
16:44:13 UTC (rev 6154)
@@ -28,8 +28,6 @@
import static org.testng.Assert.assertTrue;
import java.io.IOException;
-import java.util.Date;
-import java.util.Random;
import org.jboss.remoting3.Client;
import org.jboss.remoting3.ClientConnector;
@@ -49,8 +47,6 @@
public class RemoteCallbackTestCase extends LocalCallbackTestCase {
private static final Logger log = Logger.getLogger(RemoteCallbackTestCase.class);
-
- private static int counter = new Random(new Date().getTime()).nextInt();
private static RemotingTestBase remotingTestBase = new RemotingTestBase();
@BeforeMethod
@@ -70,8 +66,8 @@
Client<Object, Object> client = null;
try {
- int id0 = counter++;
- int id1 = counter++;
+ int id0 = Math.abs(random.nextInt());
+ int id1 = Math.abs(random.nextInt());
// Set up services.
sp0 = remotingTestBase.setupServer(null, id0, new TestRequestListener(),
SERVICE_TYPE, INSTANCE_NAME);
@@ -128,8 +124,8 @@
Client<Object, Object> client = null;
try {
- int id0 = counter++;
- int id1 = counter++;
+ int id0 = Math.abs(random.nextInt());
+ int id1 = Math.abs(random.nextInt());
// Set up services.
sp0 = remotingTestBase.setupServer(null, id0, new TestRequestListener(),
SERVICE_TYPE, INSTANCE_NAME);