diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ChainElementsFailureTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ChainElementsFailureTests.java index 40a2dda5d4c..7e42a004a29 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ChainElementsFailureTests.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ChainElementsFailureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,11 @@ import static org.assertj.core.api.Assertions.fail; import java.io.ByteArrayInputStream; +import java.util.Locale; import java.util.Properties; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.config.PropertiesFactoryBean; @@ -42,6 +45,19 @@ */ public class ChainElementsFailureTests { + private Locale localeBeforeTest; + + @Before + public void setUp() { + localeBeforeTest = Locale.getDefault(); + Locale.setDefault(new Locale("en", "US")); + } + + @After + public void tearDown() { + Locale.setDefault(localeBeforeTest); + } + @Test public void chainServiceActivator() throws Exception { diff --git a/spring-integration-file/src/test/java/org/springframework/integration/file/config/ChainElementsTests.java b/spring-integration-file/src/test/java/org/springframework/integration/file/config/ChainElementsTests.java index 9c08166b0be..5db20f65ef1 100644 --- a/spring-integration-file/src/test/java/org/springframework/integration/file/config/ChainElementsTests.java +++ b/spring-integration-file/src/test/java/org/springframework/integration/file/config/ChainElementsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,11 @@ import static org.assertj.core.api.Assertions.fail; import java.io.ByteArrayInputStream; +import java.util.Locale; import java.util.Properties; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.config.PropertiesFactoryBean; @@ -42,6 +45,19 @@ */ public class ChainElementsTests { + private Locale localeBeforeTest; + + @Before + public void setUp() { + localeBeforeTest = Locale.getDefault(); + Locale.setDefault(new Locale("en", "US")); + } + + @After + public void tearDown() { + Locale.setDefault(localeBeforeTest); + } + @Test public void chainOutboundGateway() throws Exception { try { diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XmlPayloadValidatingFilterParserTests.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XmlPayloadValidatingFilterParserTests.java index b461e254bfb..f7011380044 100644 --- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XmlPayloadValidatingFilterParserTests.java +++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XmlPayloadValidatingFilterParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,10 +20,13 @@ import static org.assertj.core.api.Assertions.fail; import java.util.List; +import java.util.Locale; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.w3c.dom.Document; @@ -58,6 +61,19 @@ @DirtiesContext public class XmlPayloadValidatingFilterParserTests { + private Locale localeBeforeTest; + + @Before + public void setUp() { + localeBeforeTest = Locale.getDefault(); + Locale.setDefault(new Locale("en", "US")); + } + + @After + public void tearDown() { + Locale.setDefault(localeBeforeTest); + } + public static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY = DocumentBuilderFactory.newInstance(); static {