Ori Liel has uploaded a new change for review.

Change subject: engine: Unit tests fail in non-English locale (#1171139)
......................................................................

engine: Unit tests fail in non-English locale (#1171139)

The failed tests have been modified to explicitly state
that they are working with English locale. Tests pass now.

Bug-Url: http://bugzilla.redhat.com/1171139
Change-Id: I5eeee8fc8bf2618ea431d76fc04e33bd35b6a8a0
Signed-off-by: Ori Liel <[email protected]>
---
M 
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ErrorTranslatorTest.java
1 file changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/83/39683/1

diff --git 
a/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ErrorTranslatorTest.java
 
b/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ErrorTranslatorTest.java
index 854f573..14d3ba4 100644
--- 
a/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ErrorTranslatorTest.java
+++ 
b/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ErrorTranslatorTest.java
@@ -28,9 +28,15 @@
     }
 
     private static void doTestNoStringSubstitution(String name) {
-        ErrorTranslator et = new ErrorTranslatorImpl(name);
-        String error = et.TranslateErrorTextSingle(TEST_KEY_NO_REPLACEMENT);
-        assertEquals("String should equal", "VM not found", error);
+        Locale locale = Locale.ENGLISH;
+        try {
+            Locale.setDefault(Locale.ENGLISH);
+            ErrorTranslator et = new ErrorTranslatorImpl(name);
+            String error = 
et.TranslateErrorTextSingle(TEST_KEY_NO_REPLACEMENT);
+            assertEquals("String should equal", "VM not found", error);
+        } finally {
+            Locale.setDefault(locale);
+        }
     }
 
     @Test


-- 
To view, visit https://gerrit.ovirt.org/39683
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5eeee8fc8bf2618ea431d76fc04e33bd35b6a8a0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to