test/java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -29,21 +29,20 @@
* repeatedly) should not encounter substantial synchronous delays
* because of the server socket accept loop's failure throttling
* procedure (which sleeps 10 seconds after 10 rapid failures).
* @author Peter Jones
*
- * @build RapidExportUnexport
+ * @library ../../testlibrary
+ * @build TestLibrary RapidExportUnexport
* @run main/othervm RapidExportUnexport
*/
import java.rmi.Remote;
import java.rmi.server.UnicastRemoteObject;
public class RapidExportUnexport {
-
- private static final int PORT = 2055;
-
+ private static final int PORT = TestLibrary.getUnusedRandomPort();
private static final int REPS = 100;
private static final long TIMEOUT = 60000;
public static void main(String[] args) throws Exception {
System.err.println("\nRegression test for bug 6275081\n");