Code Review Request 7142596: RMI JPRT tests are failing (original) (raw)
Alan Bateman Alan.Bateman at oracle.com
Wed Jul 11 08🔞44 UTC 2012
- Previous message: Code Review Request 7142596: RMI JPRT tests are failing
- Next message: hg: jdk8/tl/jdk: 6948101: java/rmi/transport/pinLastArguments/PinLastArguments.java failing intermittently
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 05/07/2012 22:22, Darryl Mocek wrote:
Hello core-libs. Please review this webrev to fix Bugs #7142596 and 7161503. Webrev can be found here: http://cr.openjdk.java.net/~dmocek/7142596/webrev.02. This commit fixes concurrency issues with the RMI tests.
- Added TestLibrary.createRegistryOnUnusedPort method. This creates an RMIRegistry on an unused port. It will try up to 10 times before giving up. - Added a TestLibrary.getRegistryPort(Registry) method to get the port number of the registry. I don't have cycles to review this in any detail but what is the reason for the "try up to 10 times". I thought the plan was to just use LocateRegistry.createRegistry(0) and so use an ephemeral port.
Also one idea is to do:
public class TestRegistry extends Registry { public static TestRegistry create() { ... } public int port() { ... } : }
so that the tests can simply do:
TestRegistry reg = TestRegistry.create();
and then use reg.port() instead of TestLibrary.getRegistryPort everywhere. It amounts to the same thing but may be a bit neater.
-Alan.
- Previous message: Code Review Request 7142596: RMI JPRT tests are failing
- Next message: hg: jdk8/tl/jdk: 6948101: java/rmi/transport/pinLastArguments/PinLastArguments.java failing intermittently
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]