Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(933)

Unified Diff: pkg/intl/test/date_time_format_test_core.dart

Issue 92333002: Retry date comparison to avoid a rare flake that might be associated with DST (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/test/date_time_format_test_core.dart
diff --git a/pkg/intl/test/date_time_format_test_core.dart b/pkg/intl/test/date_time_format_test_core.dart
index 757bb6bd80ef276fd34b574259fad5451c6e702b..0ea05176c0f523db37ea26b1fc9230ea25a4e645 100644
--- a/pkg/intl/test/date_time_format_test_core.dart
+++ b/pkg/intl/test/date_time_format_test_core.dart
@@ -163,6 +163,15 @@ testRoundTripParsing(String localeName, DateTime date) {
var actualResult = format.format(date);
var parsed = format.parse(actualResult);
var thenPrintAgain = format.format(parsed);
+ // Very rarely, it seems like we can get an off-by-one error when using a
+ // format that only prints the date. This seems like it might be
+ // associated with a daylight savings transition, but it's not at all
+ // clear how. Regardless, if we get a non-equal result once, re-parse
+ // and re-print in case it's transient.
+ if (thenPrintAgain != actualResult) {
+ parsed = format.parse(actualResult);
+ thenPrintAgain = format.format(parsed);
+ }
kustermann 2013/11/28 10:16:26 I don't think you should do this. Now that I see
floitsch 2013/11/28 10:29:05 I agree with Martin. This should never happen, and
expect(thenPrintAgain, equals(actualResult));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698