-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8254350: CompletableFuture.get may swallow InterruptedException #1651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/issue add JDK-8254350 |
👋 Welcome back martin! A progress list of the required criteria for merging this PR into |
@Martin-Buchholz |
@Martin-Buchholz This issue is referenced in the PR title - it will now be updated. |
a0da5b2
to
4e32f8c
Compare
Webrevs
|
4e32f8c
to
762a171
Compare
* @key randomness | ||
*/ | ||
|
||
// TODO: Rewrite as a CompletableFuture tck test ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want the "TODO" in the commit?
@Martin-Buchholz This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
static final int ITERATIONS = 10_000; | ||
|
||
public static void main(String[] args) throws Exception { | ||
ThreadLocalRandom rnd = ThreadLocalRandom.current(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Martin,
Is using a ThreadLocalRandom
important for the test logic?
I was wondering whether it would be better to use ( * @library /test/lib
) jdk.test.lib.RandomFactory
,
which prints the random seed in the output so that you can reproduce with the same pseudo-random
sequence in case of test failures.
best regards,
-- daniel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RandomFactory is probably overkill here as the test just needs to exercise untimed and timed get. So just a random boolean rather than a wide range of random values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Mailing list message from Martin Buchholz on core-libs-dev: On Mon, Dec 7, 2020 at 11:56 PM Alan Bateman <alanb at openjdk.java.net> wrote:
|
Mailing list message from Martin Buchholz on core-libs-dev: On Tue, Dec 8, 2020 at 3:54 AM Daniel Fuchs <dfuchs at openjdk.java.net> wrote:
There's a conflict between the desires to do more thorough testing and Especially in j.u.concurrent we embrace test non-determinism, much of it No one does a good job of race prevention through testing. |
This change went into jdk16 instead and was automatically forward-ported to jdk, so abandoning this PR. |
/cc core-libs
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1651/head:pull/1651
$ git checkout pull/1651