RFR: JDK-8304063: tools/jpackage/share/AppLauncherEnvTest.java fails when checking LD_LIBRARY_PATH [v2]

Alexey Semenyuk asemenyuk at openjdk.org
Thu Mar 16 13:16:29 UTC 2023


On Thu, 16 Mar 2023 09:03:36 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> test/jdk/tools/jpackage/share/AppLauncherEnvTest.java line 93:
>> 
>>> 91:         } else {
>>> 92:             TKit.assertEquals(expectedEnvVarValue, actualEnvVarValue, msg);
>>> 93:         }
>> 
>> I'd keep the check as a single statement:
>> 
>> TKit.assertTextStream(expectedEnvVarValue)
>>     .predicate(TKit.isLinux() ? String::endsWith : String::equals)
>>     .label(String.format("value of %s env variable", envVarName))
>>     .apply(Stream.of(actualEnvVarValue));
>> 
>> 
>> It also will produce a nicer log record than `TKit.assertTrue(false, msg);`
>
> Hi Alexey, I adjusted the check following your advice .

Thank you!

-------------

PR: https://git.openjdk.org/jdk/pull/13041


More information about the core-libs-dev mailing list