test/java/rmi/transport/pinClientSocketFactory/PinClientSocketFactory.java
Print this page
@@ -29,10 +29,12 @@
* particular, after the stub has become unreachable and all
* connections to its endpoint have been closed, then the factory
* should become unreachable too (through the RMI implementation).
* @author Peter Jones
*
+ * @library ../../testlibrary
+ * @build TestLibrary
* @run main/othervm -Dsun.rmi.transport.connectionTimeout=2000
* PinClientSocketFactory
*/
import java.io.IOException;
@@ -54,11 +56,11 @@
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
public class PinClientSocketFactory {
- private static final int PORT = 2345;
+ private static final int PORT = TestLibrary.getUnusedRandomPort();
private static final int SESSIONS = 50;
public interface Factory extends Remote {
Session getSession() throws RemoteException;
}