Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b71
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8018775 | 7u45 | Stuart Marks | P4 | Closed | Fixed | b01 |
JDK-8007578 | 7u40 | Stuart Marks | P4 | Closed | Fixed | b22 |
JDK-8010581 | 7u25 | Stuart Marks | P4 | Closed | Fixed | b03 |
JDK-8008859 | 7u21 | Stuart Marks | P4 | Closed | Fixed | b02 |
Description
The RMI test library (jdk/test/java/rmi/testlibrary) has a convenience API (the JavaVM class) for launching a JVM subprocess. When starting the subprocess, it adds the -showversion option to the JVM command line and waits for the version output to arrive from the subprocess before returning to the caller. This mechanism was added because the original code unconditionally slept for two seconds before returning to the caller, in an attempt to delay the caller until the JVM subprocess was ready. The -showversion mechanism reduced the wait time if the JVM subprocess became ready sooner.
It turns out this is no longer necessary.
The two-second delay was insufficient to avoid race conditions. Callers that need to interact with the JVM subprocess have to have their own wait/retry logic anyway. Indeed, this is elsewhere in the RMI test library already (RMID.java, ActivationLibrary.java), and in fact all the RMI tests pass with the two-second sleep and showversion mechanism removed, even if an extra delay is added to the subprocess.
Thus the two-second delay and the -showversion mechanism can be removed entirely.
It turns out this is no longer necessary.
The two-second delay was insufficient to avoid race conditions. Callers that need to interact with the JVM subprocess have to have their own wait/retry logic anyway. Indeed, this is elsewhere in the RMI test library already (RMID.java, ActivationLibrary.java), and in fact all the RMI tests pass with the two-second sleep and showversion mechanism removed, even if an extra delay is added to the subprocess.
Thus the two-second delay and the -showversion mechanism can be removed entirely.
Attachments
Issue Links
- backported by
-
JDK-8007578 TEST_BUG: remove -showversion from RMI test library subprocess mechanism
- Closed
-
JDK-8008859 TEST_BUG: remove -showversion from RMI test library subprocess mechanism
- Closed
-
JDK-8010581 TEST_BUG: remove -showversion from RMI test library subprocess mechanism
- Closed
-
JDK-8018775 TEST_BUG: remove -showversion from RMI test library subprocess mechanism
- Closed
- relates to
-
JDK-7144861 RMI activation tests are too slow
- Closed