--- a/jdk/test/java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java Mon Jul 16 22:05:16 2012 -0700
+++ b/jdk/test/java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java Tue Jul 17 11:01:44 2012 -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
@@ -37,6 +37,7 @@
* @library ../../../testlibrary
* @build FiniteGCLatency
* @build FiniteGCLatency_Stub
+ * @build TestLibrary
* @run main/othervm/timeout=120 FiniteGCLatency
*/
@@ -78,11 +79,11 @@
try {
UnicastRemoteObject.exportObject(obj);
System.err.println("exported remote object");
-
- LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
+ Registry registry1 = TestLibrary.createRegistryOnUnusedPort();
+ int port = TestLibrary.getRegistryPort(registry1);
System.err.println("created registry");
- Registry registry = LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
+ Registry registry = LocateRegistry.getRegistry("", port);
registry.bind(BINDING, obj);
System.err.println("bound remote object in registry");