Alexander Wels has uploaded a new change for review.

Change subject: engine: explicitly set locale for unit test.
......................................................................

engine: explicitly set locale for unit test.

- When running the unit tests on a machine set with
  a locale to fr_FR it would cause the unit test to
  fail as the alternate locale was loaded by default
  instead of en_US. This patch sets the VM locale to
  en_US before the test run.

Change-Id: I7b3d766413ba095e4543ad3f8c3e6d4af7591cf9
Signed-off-by: Alexander Wels <aw...@redhat.com>
---
M 
backend/manager/modules/branding/src/test/java/org/ovirt/engine/core/branding/BrandingManagerTest.java
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/15/32315/1

diff --git 
a/backend/manager/modules/branding/src/test/java/org/ovirt/engine/core/branding/BrandingManagerTest.java
 
b/backend/manager/modules/branding/src/test/java/org/ovirt/engine/core/branding/BrandingManagerTest.java
index 74e906d..b8d263a 100644
--- 
a/backend/manager/modules/branding/src/test/java/org/ovirt/engine/core/branding/BrandingManagerTest.java
+++ 
b/backend/manager/modules/branding/src/test/java/org/ovirt/engine/core/branding/BrandingManagerTest.java
@@ -19,11 +19,18 @@
 import org.codehaus.jackson.JsonParser;
 import org.codehaus.jackson.map.ObjectMapper;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
+import org.ovirt.engine.core.utils.servlet.LocaleFilter;
 
 public class BrandingManagerTest {
     BrandingManager testManager;
 
+    @BeforeClass
+    public static void setLocale() {
+        Locale.setDefault(LocaleFilter.DEFAULT_LOCALE);
+    }
+
     @Before
     public void setUp() throws Exception {
         File etcDir = new File(this.getClass().getClassLoader().


-- 
To view, visit http://gerrit.ovirt.org/32315
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b3d766413ba095e4543ad3f8c3e6d4af7591cf9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <aw...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to