Author: sebb
Date: Tue Sep 20 09:15:36 2011
New Revision: 1173042

URL: http://svn.apache.org/viewvc?rev=1173042&view=rev
Log:
Bug 51847 - Some Junit tests are Locale sensitive and fail if Locale is 
different from US

Modified:
    
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java
    jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java?rev=1173042&r1=1173041&r2=1173042&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java
 (original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java
 Tue Sep 20 09:15:36 2011
@@ -27,8 +27,9 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
-import java.util.SimpleTimeZone;
+import java.util.TimeZone;
 
 import org.apache.commons.httpclient.Header;
 import org.apache.commons.httpclient.HttpMethod;
@@ -134,6 +135,7 @@ public class TestCacheManager extends JM
     
     private static final String LOCAL_HOST = "http://localhost/";;
     private static final String EXPECTED_ETAG = "0xCAFEBABEDEADBEEF";
+    private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
     private CacheManager cacheManager;
     private String currentTimeInGMT;
     private URL url;
@@ -148,9 +150,8 @@ public class TestCacheManager extends JM
     }
 
     private String makeDate(Date d){
-        SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
-        simpleDateFormat.setTimeZone(new SimpleTimeZone(0, "GMT"));
-        simpleDateFormat.applyPattern("EEE, dd MMM yyyy HH:mm:ss z");
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE, dd MMM 
yyyy HH:mm:ss z", Locale.US);
+        simpleDateFormat.setTimeZone(GMT);
         return simpleDateFormat.format(d);
     }
 

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=1173042&r1=1173041&r2=1173042&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Tue Sep 20 09:15:36 2011
@@ -129,6 +129,7 @@ This can be overridden by setting the JM
 <li>Bug 51821 - Add short-cut for Enabling / Disabling (sub)tree or branches 
in test plan.</li>
 <li>Bug 47921 - Variables not released for GC after JMeterThread exits.</li>
 <li>Bug 51839 - "... end of run" printed prematurely</li>
+<li>Bug 51847 - Some Junit tests are Locale sensitive and fail if Locale is 
different from US</li>
 </ul>
 
 <!-- ==================================================== -->



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@jakarta.apache.org
For additional commands, e-mail: notifications-h...@jakarta.apache.org

Reply via email to