RFR: 7904076: Include timestamp in the summary logs for junit and testng tests

Christian Stein cstein at openjdk.org
Sat Sep 6 14:02:22 UTC 2025


On Sat, 6 Sep 2025 13:43:52 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this change which enhances the log messages printed by jtreg when summarizing the test execution?
> 
> With this change, the started/finished log messages will now look like:
> 
> For testng:
> 
> [09:10:12.473] test p.q.Pass.m1(): success [10ms]
> [09:10:13.123] test p.q.Pass.m2(): success [202ms]
> 
> 
> For junit:
> 
> [09:55:22.278] STARTED    p.JUnitTest::test 'test'
> [09:55:22.279] SUCCESSFUL p.JUnitTest::test 'test' [1ms]
> 
> 
> The timestamp associated with these logs would help during investigating test failures or test timeouts. No new self test has been added given the nature of this change.

A welcomed improvement!

Nit: remove `final` modifier from local variable declarations to align with the existing code style.

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

Marked as reviewed by cstein (Reviewer).

PR Review: https://git.openjdk.org/jtreg/pull/286#pullrequestreview-3192814615


More information about the jtreg-dev mailing list