--- old/test/java/rmi/transport/handshakeTimeout/HandshakeTimeout.java 2012-07-13 13:17:37.254874503 -0700 +++ new/test/java/rmi/transport/handshakeTimeout/HandshakeTimeout.java 2012-07-13 13:17:37.038871065 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -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 {