camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject [camel] branch master updated: camel-jackson*: JacksonMarshalDateTimezoneTest: check that requested timezone is available on the system (VMs on build.apache.org currently do not support the timezone "Africa/Ouagadougou" used by the test)
Date Tue, 14 Nov 2017 20:50:47 GMT
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 0842019  camel-jackson*: JacksonMarshalDateTimezoneTest: check that requested timezone
is available on the system (VMs on build.apache.org currently do not support the timezone
"Africa/Ouagadougou" used by the test)
0842019 is described below

commit 084201986774d6306aec3bd3e6fc76cb17c2e210
Author: Pascal Schumacher <pascalschumacher@gmx.net>
AuthorDate: Tue Nov 14 21:50:26 2017 +0100

    camel-jackson*: JacksonMarshalDateTimezoneTest: check that requested timezone is available
on the system (VMs on build.apache.org currently do not support the timezone "Africa/Ouagadougou"
used by the test)
---
 .../camel/component/jackson/JacksonMarshalDateTimezoneTest.java    | 7 ++++++-
 .../camel/component/jacksonxml/JacksonMarshalDateTimezoneTest.java | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalDateTimezoneTest.java
b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalDateTimezoneTest.java
index 30457e8..6981967 100644
--- a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalDateTimezoneTest.java
+++ b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalDateTimezoneTest.java
@@ -16,6 +16,9 @@
  */
 package org.apache.camel.component.jackson;
 
+import static java.lang.String.format;
+import static org.junit.Assume.assumeTrue;
+
 import java.util.Calendar;
 import java.util.GregorianCalendar;
 import java.util.TimeZone;
@@ -49,7 +52,9 @@ public class JacksonMarshalDateTimezoneTest extends CamelTestSupport {
             @Override
             public void configure() throws Exception {
                 JacksonDataFormat format = new JacksonDataFormat();
-                TimeZone timeZone = TimeZone.getTimeZone("Africa/Ouagadougou");
+                String timeZoneId = "Africa/Ouagadougou";
+                TimeZone timeZone = TimeZone.getTimeZone(timeZoneId);
+                assumeTrue(format("TimeZone with id '%s' is available", timeZoneId), timeZone.getID().equals(timeZoneId));
                 format.setTimezone(timeZone);
 
                 from("direct:in").marshal(format).to("mock:result");
diff --git a/components/camel-jacksonxml/src/test/java/org/apache/camel/component/jacksonxml/JacksonMarshalDateTimezoneTest.java
b/components/camel-jacksonxml/src/test/java/org/apache/camel/component/jacksonxml/JacksonMarshalDateTimezoneTest.java
index 740b8aa..c7cf331 100644
--- a/components/camel-jacksonxml/src/test/java/org/apache/camel/component/jacksonxml/JacksonMarshalDateTimezoneTest.java
+++ b/components/camel-jacksonxml/src/test/java/org/apache/camel/component/jacksonxml/JacksonMarshalDateTimezoneTest.java
@@ -16,6 +16,9 @@
  */
 package org.apache.camel.component.jacksonxml;
 
+import static java.lang.String.format;
+import static org.junit.Assume.assumeTrue;
+
 import java.util.Calendar;
 import java.util.GregorianCalendar;
 import java.util.TimeZone;
@@ -49,7 +52,9 @@ public class JacksonMarshalDateTimezoneTest extends CamelTestSupport {
             @Override
             public void configure() throws Exception {
                 JacksonXMLDataFormat format = new JacksonXMLDataFormat();
-                TimeZone timeZone = TimeZone.getTimeZone("Africa/Ouagadougou");
+                String timeZoneId = "Africa/Ouagadougou";
+                TimeZone timeZone = TimeZone.getTimeZone(timeZoneId);
+                assumeTrue(format("TimeZone with id '%s' is available", timeZoneId), timeZone.getID().equals(timeZoneId));
                 format.setTimezone(timeZone);
 
                 from("direct:in").marshal(format).to("mock:result");

-- 
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <commits@camel.apache.org>'].

Mime
View raw message