On Fri, 25 Oct 2024 04:35:18 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>> test/jdk/tools/jar/MultipleManifestTest.java line 203:
>> 
>>> 201: 
>>> 202:     private void assertOutputContains(String expected) {
>>> 203:         Assertions.assertTrue(baos.toString().contains(expected));
>> 
>> The linked JBS issue notes that the test was failing because of the 
>> additional (new) log messages from the jar tool itself. So I think the logs 
>> will be deterministic (since they aren't being generated by something else 
>> other than the jar tool). Using `contains()` thus looks fine to me.
>
> Do you think we should print out the actual and expected, when they don't 
> match? It might make it easier to debug any unexpected failures in future.

The output is always printed in the log, so we know the actual value. If a test 
failed, the source code tell us the expected.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21697#discussion_r1816360973

Reply via email to