You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/08/14 12:40:20 UTC
[commons-lang] branch master updated: Better assert message
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 255db4450 Better assert message
255db4450 is described below
commit 255db44501865a41f9f4082e73ac085ab99eb4b5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Aug 14 08:40:15 2023 -0400
Better assert message
---
.../commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java
index 9ce6d899f..d990f5ddf 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java
@@ -125,9 +125,9 @@ public class FastDateParser_TimeZoneStrategyTest extends AbstractLangTest {
} catch (ParseException e) {
failCount++;
// Missing "Zulu" or something else in broken JDK's GH builds?
- parseExceptionList.add(new AssertionFailedError(
- String.format("%s: with tzDefault = %s, locale = %s, zones[][] size = '%s', zIndex = %,d, tzDisplay = '%s', parser = '%s'", e,
- timeZone, locale, zone.length, zIndex, tzDisplay, parser.toStringAll()),
+ final String msg = String.format("%s: with tzDefault = %s, locale = %s, zones[][] size = '%s', zIndex = %,d, tzDisplay = '%s', parser = '%s'", e,
+ timeZone, locale, zone.length, zIndex, tzDisplay, parser.toStringAll());
+ parseExceptionList.add(new AssertionFailedError(msg,
e));
// HACK check
if (failCount > 43) {
@@ -140,7 +140,7 @@ public class FastDateParser_TimeZoneStrategyTest extends AbstractLangTest {
Stream.of(zones).forEach(zoneArray -> zonesPs.printf("[%,d] %s%n", i.getAndIncrement(), Arrays.toString(zoneArray)));
System.err.println(zonesOut);
System.err.println(parseExceptionList);
- fail(e);
+ fail(String.format("failCount = %,d, %s", failCount, msg), e);
}
}
}