8170896: TEST_BUG: java/rmi/server/Unreferenced/leaseCheckInterval/LeaseCheckInterval.java failed with unreferenced() not invoked after 20.0 seconds #28919
+63
−37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Can I please get a review of this test-only change which addresses intermittent failures in
java/rmi/server/Unreferenced/leaseCheckInterval/LeaseCheckInterval.java?The
@summaryin that test's test definition about what this test does:In its current form, the test uses a lease expiry of 10 seconds, launches a trivial
javaapplication which looks up the bound object from the registry and then terminates itself. After launching that trivial java application, the test then waits for 20 seconds, expecting that theUnreferenced.unreferenced()callback (upon lease expiry of 10 seconds) will be called within those 20 seconds. This wait intermittently fails because theUnreferenced.unreferenced()doesn't get called within those 20 seconds.Experiments show that the reason for these intermittent failures is due to the
SelfTerminatorapplication which does the registry lookup (and which involves connection establishment and communication over a socket) can sometimes take several seconds (5 or more for example). That effectively means that by the time thisSelfTerminatorstarts its termination after the lookup, it's already several seconds into the "wait()" in the test.The commit in this PR cleans up the test to more accurately track the duration of how long it took between the lease expiry and the
Unreferenced.unreferenced()callback to be invoked. Additionally, just to make the test more robust, the maximum expected duration has been increased to 60 seconds instead of 20 seconds. Given the text in the test's summary, I think this increase is still within the expectations of how long it takes for the callback to be invoked after the client has exited abnormally.The test continues to pass with this change and a test repeat of 50 too did not reproduce any failures.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28919/head:pull/28919$ git checkout pull/28919Update a local copy of the PR:
$ git checkout pull/28919$ git pull https://git.openjdk.org/jdk.git pull/28919/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28919View PR using the GUI difftool:
$ git pr show -t 28919Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28919.diff
Using Webrev
Link to Webrev Comment