cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject git commit: updated refs/heads/master to 6c77095
Date Tue, 11 Feb 2014 13:49:55 GMT
Updated Branches:
  refs/heads/master ea5f318c9 -> 6c770958f


Fix unittest issue when you are in a locale that uses comma for decimal separation.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6c770958
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6c770958
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6c770958

Branch: refs/heads/master
Commit: 6c770958f1f9ecc7271cf7d308e7f149fad0274f
Parents: ea5f318
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Mon Feb 10 12:27:03 2014 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Tue Feb 11 14:45:45 2014 +0100

----------------------------------------------------------------------
 utils/test/com/cloud/utils/NumbersUtilTest.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c770958/utils/test/com/cloud/utils/NumbersUtilTest.java
----------------------------------------------------------------------
diff --git a/utils/test/com/cloud/utils/NumbersUtilTest.java b/utils/test/com/cloud/utils/NumbersUtilTest.java
index 609fd61..989c3a9 100644
--- a/utils/test/com/cloud/utils/NumbersUtilTest.java
+++ b/utils/test/com/cloud/utils/NumbersUtilTest.java
@@ -18,12 +18,15 @@ package com.cloud.utils;
 
 import static org.junit.Assert.assertEquals;
 
+import java.util.Locale;
+
 import org.junit.Test;
 
 public class NumbersUtilTest {
 
     @Test
     public void toReadableSize() {
+        Locale.setDefault(Locale.US); // Fixed locale for the test
         assertEquals("1.0000 TB", NumbersUtil.toReadableSize((1024l * 1024l * 1024l * 1024l)));
         assertEquals("1.00 GB", NumbersUtil.toReadableSize(1024 * 1024 * 1024));
         assertEquals("1.00 MB", NumbersUtil.toReadableSize(1024 * 1024));


Mime
View raw message