Integrated: 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
Tue Nov 15 12:13:43 UTC 2022
On Wed, 26 Oct 2022 10:28:19 GMT, Adam Sotona <asotona at openjdk.org> wrote:
> 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
This pull request has now been integrated.
Changeset: a45c9af1
Author: Adam Sotona <asotona at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a45c9af1242d9ad497995f2c1228b6e85dfd79d8
Stats: 46 lines in 2 files changed: 11 ins; 26 del; 9 mod
8295814: jdk/jshell/CommandCompletionTest.java fails with "lists don't have the same size expected [2] but found [1]"
Reviewed-by: jlahoda
-------------
PR: https://git.openjdk.org/jdk/pull/10870
More information about the kulla-dev
mailing list