Skip to content

Commit

Permalink
Add enrich the failed test log with seed (#1111)
Browse files Browse the repository at this point in the history
  • Loading branch information
seongahjo authored Dec 3, 2024
1 parent aa7e3e4 commit 23aeb3c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/content/v1.1.x-kor/release-notes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ sectionStart
## v.1.1.4
Fix not registering size API if decomposing.

Add enrich the failed test log with seed.

sectionEnd

sectionStart
Expand Down
2 changes: 2 additions & 0 deletions docs/content/v1.1.x/release-notes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ sectionStart
## v.1.1.4
Fix not registering size API if decomposing.

Add enrich the failed test log with seed.

sectionEnd

sectionStart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,13 @@ private void setSeed(long seed) {
* This method logs the seed value when a test method execution fails.
**/
private void logSeedIfTestFailed(ExtensionContext context) {
Class<?> testClass = context.getRequiredTestClass();
Method testMethod = context.getRequiredTestMethod();
LOGGER.error(
String.format("Test Method [%s] failed with seed: %d", testMethod.getName(), Randoms.currentSeed()));
"Test Method [{}#{}] failed with seed: {}",
testClass.getSimpleName(),
testMethod.getName(),
Randoms.currentSeed()
);
}
}

0 comments on commit 23aeb3c

Please sign in to comment.