RFR: 8295814: jdk/jshell/CommandCompletionTest.java fails with "lists don't have the same size expected [2] but found [1]"
Adam Sotona
asotona at openjdk.org
Wed Oct 26 10:47:57 UTC 2022
File completion in CommandCompletionTest::testSet intermittently fails.
Also message provided by org.testng.Assert::assertEquals is also not very verbose when comparing collections:
"lists don't have the same size expected [2] but found [1]".
Cause of the failure is in the expected side of the assertion (CommandCompletionTest::getRootDirectories), which may conatain duplicates. While the actual side of the assertion is distinct (CommandCompletionTest::computeCompletions).
Proposed patch de-duplicates CommandCompletionTest::getRootDirectories and adds full description of the expected result to the error message for future debugging.
Please review.
Thanks,
Adam
-------------
Commit messages:
- CommandCompletionTest removed from ProblemList
- Merge branch 'master' into JDK-8295814
- 8295814: jdk/jshell/CommandCompletionTest.java fails with "lists don't have the same size expected [2] but found [1]"
Changes: https://git.openjdk.org/jdk/pull/10870/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10870&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8295814
Stats: 5 lines in 2 files changed: 2 ins; 1 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/10870.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10870/head:pull/10870
PR: https://git.openjdk.org/jdk/pull/10870
More information about the kulla-dev
mailing list