Hi,
        after bug 6609737[1] was fixed LocalizationServiceTest was updated to
expect "MEZ" instead of "CET" as timezone for the German-locale
timestamp format assertion. This is correct in those JDKs that contain a
fix, but the test actually fails when run on some older JDKs.

As we use IBM j9 downstream, we propose the attached patch to let the
test to pass in any case.

[1] http://bugs.sun.com/view_bug.do?bug_id=6609737

Regards,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany
>From 77ebde681a357f44499d90e015c5cb94e2172a4d Mon Sep 17 00:00:00 2001
From: Silvio Moioli <smoi...@suse.de>
Date: Wed, 14 Aug 2013 16:14:30 +0200
Subject: [PATCH] LocalizationServiceTest: run on JDKs without fix for bug
 6609737

---
 .../redhat/rhn/common/localization/test/LocalizationServiceTest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/common/localization/test/LocalizationServiceTest.java b/java/code/src/com/redhat/rhn/common/localization/test/LocalizationServiceTest.java
index a4c2631..2c91228 100644
--- a/java/code/src/com/redhat/rhn/common/localization/test/LocalizationServiceTest.java
+++ b/java/code/src/com/redhat/rhn/common/localization/test/LocalizationServiceTest.java
@@ -206,8 +206,8 @@ public class LocalizationServiceTest extends RhnBaseTestCase {
         // Now test formatting it to German format in a DE TimeZone.
         ctx.setTimezone(TimeZone.getTimeZone("Europe/Paris"));
         String deDate = ls.formatDate(dt, Locale.GERMAN);
-        expected = "10.12.04 22:20:00 MEZ";
-        assertEquals(expected, deDate);
+        expected = "10\\.12\\.04 22:20:00 (CET|MEZ)";
+        assertTrue(deDate.matches(expected));
 
         String shortDeDate = ls.formatShortDate(dt, Locale.GERMAN);
         expected = "10.12.04";
-- 
1.8.1.4

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to