--- old/test/java/rmi/transport/handshakeTimeout/HandshakeTimeout.java 2012-07-03 11:32:15.559382675 -0700 +++ new/test/java/rmi/transport/handshakeTimeout/HandshakeTimeout.java 2012-07-03 11:32:15.359379490 -0700 @@ -33,7 +33,8 @@ * this point (because no data for the invocation has yet been written). * @author Peter Jones * - * @build HandshakeTimeout + * @library ../../testlibrary + * @build HandshakeTimeout TestLibrary * @run main/othervm HandshakeTimeout */ @@ -46,7 +47,7 @@ public class HandshakeTimeout { - private static final int PORT = 2020; + private static final int PORT = TestLibrary.getUnusedRandomPort(); private static final int TIMEOUT = 10000; public static void main(String[] args) throws Exception {