--- old/test/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java 2012-07-13 13:17:32.418797513 -0700 +++ new/test/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java 2012-07-13 13:17:32.206794138 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -29,6 +29,7 @@ * * @library ../../testlibrary * @build CheckLeaseLeak CheckLeaseLeak_Stub LeaseLeakClient LeaseLeak + * @build TestLibrary * @run main/othervm/timeout=240 CheckLeaseLeak * */ @@ -57,7 +58,6 @@ import java.rmi.registry.*; public class CheckLeaseLeak extends UnicastRemoteObject implements LeaseLeak { - public CheckLeaseLeak() throws RemoteException { } public void ping () throws RemoteException { } @@ -87,8 +87,8 @@ try { Registry registry = - java.rmi.registry.LocateRegistry. - createRegistry(TestLibrary.REGISTRY_PORT); + TestLibrary.createRegistryOnUnusedPort(); + int registryPort = TestLibrary.getRegistryPort(registry); leakServer = new CheckLeaseLeak(); registry.rebind("/LeaseLeak", leakServer); @@ -99,7 +99,10 @@ JavaVM jvm = new JavaVM("LeaseLeakClient", " -Djava.security.policy=" + - TestParams.defaultPolicy, ""); + TestParams.defaultPolicy + + " -Drmi.registry.port=" + + registryPort, + ""); jvm.start(); if (jvm.getVM().waitFor() == 1 ) {