RFR: 7903753: Report duration of testng test methods [v2]

Jaikiran Pai jpai at openjdk.org
Thu Jun 13 14:00:46 UTC 2024


> Can I please get a review of this change which proposes to print the duration for each of the testng test methods? This addresses https://bugs.openjdk.org/browse/CODETOOLS-7903753.
> 
> Similar to https://github.com/openjdk/jtreg/pull/206, which does this for junit tests, the commit in this PR includes the duration for each test method as follows:
> 
> 
> test LargeEntriesTest.testForceZIP64End(java.util.ImmutableCollections$MapN at 1398b884, 8): success [141ms]
> test LargeEntriesTest.testForceZIP64End(java.util.ImmutableCollections$MapN at 1caef225, 0): success [5ms]
> test LargeEntriesTest.testForceZIP64End(java.util.ImmutableCollections$MapN at 2a2df4a5, 8): success [4ms]
> test LargeEntriesTest.testForceZIP64End(java.util.ImmutableCollections$MapN at 85ce7c1, 0): success [3ms]
> test LargeEntriesTest.testJar({create=true}, 8): success [5121ms]
> test LargeEntriesTest.testJar(java.util.ImmutableCollections$MapN at 34771e2b, 0): success [3029ms]
> test LargeEntriesTest.testJar(java.util.ImmutableCollections$MapN at 27fb5d9f, 8): success [4333ms]
> test LargeEntriesTest.testZip({create=true}, 8): success [3944ms]
> test LargeEntriesTest.testZip(java.util.ImmutableCollections$MapN at 62272fdb, 0): success [2638ms]
> test LargeEntriesTest.testZip(java.util.ImmutableCollections$MapN at 6f1bd253, 8): success [4138ms]
> 
> 
> A new self test has been introduced to verify this change and an existing self test had to be updated to allow for the presence of the duration in the text output. All self tests including the new one continue to pass with these changes.

Jaikiran Pai has updated the pull request incrementally with two additional commits since the last revision:

 - update copyright year
 - don't rely on testng's duration reporting instead use System.nanoTime() in listeners to track duration

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

Changes:
  - all: https://git.openjdk.org/jtreg/pull/207/files
  - new: https://git.openjdk.org/jtreg/pull/207/files/63c70925..eefc5753

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jtreg&pr=207&range=01
 - incr: https://webrevs.openjdk.org/?repo=jtreg&pr=207&range=00-01

  Stats: 21 lines in 2 files changed: 17 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jtreg/pull/207.diff
  Fetch: git fetch https://git.openjdk.org/jtreg.git pull/207/head:pull/207

PR: https://git.openjdk.org/jtreg/pull/207


More information about the jtreg-dev mailing list