You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pa...@apache.org on 2017/11/14 20:50:47 UTC

[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)

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 <pa...@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" <co...@camel.apache.org>'].