wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r940894 - in /incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request: RequestMethodsTest.java WinkRequestMethodsTest.java
Date Tue, 04 May 2010 15:10:58 GMT
Author: rott
Date: Tue May  4 15:10:57 2010
New Revision: 940894

URL: http://svn.apache.org/viewvc?rev=940894&view=rev
Log:
use GMT in itest to accommodate different systems a little better

Modified:
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request/RequestMethodsTest.java
    incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request/WinkRequestMethodsTest.java

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request/RequestMethodsTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request/RequestMethodsTest.java?rev=940894&r1=940893&r2=940894&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request/RequestMethodsTest.java
(original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request/RequestMethodsTest.java
Tue May  4 15:10:57 2010
@@ -130,11 +130,9 @@ public class RequestMethodsTest extends 
          * get the time zone for the server
          */
         GetMethod getMethod = new GetMethod(getBaseURI() + "/context/request/timezone");
-        String serverTimeZone = null;
         try {
             client.executeMethod(getMethod);
             assertEquals(200, getMethod.getStatusCode());
-            serverTimeZone = getMethod.getResponseBodyAsString();
         } finally {
             getMethod.releaseConnection();
         }
@@ -181,7 +179,7 @@ public class RequestMethodsTest extends 
              */
             client.executeMethod(getMethod);
             assertEquals(200, getMethod.getStatusCode());
-            rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+            rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
             assertEquals("the date: " + rfc1123Format.format(d), getMethod
                 .getResponseBodyAsString());
             rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
@@ -218,7 +216,7 @@ public class RequestMethodsTest extends 
              */
             client.executeMethod(getMethod);
             assertEquals(200, getMethod.getStatusCode());
-            rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+            rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
             assertEquals("the date: " + rfc1123Format.format(d), getMethod
                 .getResponseBodyAsString());
             rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
@@ -289,11 +287,9 @@ public class RequestMethodsTest extends 
          * get the time zone for the server
          */
         GetMethod getMethod = new GetMethod(getBaseURI() + "/context/request/timezone");
-        String serverTimeZone = null;
         try {
             client.executeMethod(getMethod);
             assertEquals(200, getMethod.getStatusCode());
-            serverTimeZone = getMethod.getResponseBodyAsString();
         } finally {
             getMethod.releaseConnection();
         }
@@ -327,7 +323,7 @@ public class RequestMethodsTest extends 
              */
             client.executeMethod(getMethod);
             assertEquals(200, getMethod.getStatusCode());
-            rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+            rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
             assertEquals("the date: " + rfc1123Format.format(d), getMethod
                 .getResponseBodyAsString());
             rfc1123Format.setTimeZone(TimeZone.getDefault());
@@ -349,7 +345,7 @@ public class RequestMethodsTest extends 
              */
             client.executeMethod(getMethod);
             assertEquals(200, getMethod.getStatusCode());
-            rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+            rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
             assertEquals("the date: " + rfc1123Format.format(d), getMethod
                 .getResponseBodyAsString());
             rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
@@ -372,7 +368,7 @@ public class RequestMethodsTest extends 
              */
             client.executeMethod(getMethod);
             assertEquals(200, getMethod.getStatusCode());
-            rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+            rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
             assertEquals("the date: " + rfc1123Format.format(d), getMethod
                 .getResponseBodyAsString());
             rfc1123Format.setTimeZone(TimeZone.getDefault());
@@ -411,7 +407,7 @@ public class RequestMethodsTest extends 
              */
             client.executeMethod(getMethod);
             assertEquals(200, getMethod.getStatusCode());
-            rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+            rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
             assertEquals("the date: " + rfc1123Format.format(d), getMethod
                 .getResponseBodyAsString());
             rfc1123Format.setTimeZone(TimeZone.getDefault());

Modified: incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request/WinkRequestMethodsTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request/WinkRequestMethodsTest.java?rev=940894&r1=940893&r2=940894&view=diff
==============================================================================
--- incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request/WinkRequestMethodsTest.java
(original)
+++ incubator/wink/trunk/wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/request/WinkRequestMethodsTest.java
Tue May  4 15:10:57 2010
@@ -136,7 +136,6 @@ public class WinkRequestMethodsTest exte
         Resource dateResource = client.resource(getBaseURI() + "/context/request/timezone");
         ClientResponse response = dateResource.get();
         assertEquals(200, response.getStatusCode());
-        String serverTimeZone = response.getEntity(String.class);
 
         /*
          * sets a last modified date
@@ -163,7 +162,7 @@ public class WinkRequestMethodsTest exte
         dateResource = client.resource(getBaseURI() + "/context/request/date");
         response = dateResource.get();
         assertEquals(200, response.getStatusCode());
-        rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+        rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
         assertEquals("the date: " + rfc1123Format.format(d), response.getEntity(String.class));
         rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
         assertEquals(rfc1123Format.format(d), response.getHeaders()
@@ -188,7 +187,7 @@ public class WinkRequestMethodsTest exte
         dateResource = client.resource(getBaseURI() + "/context/request/date");
         response = dateResource.header(HttpHeaders.IF_MODIFIED_SINCE, formatter.format(d2)).get();
         assertEquals(200, response.getStatusCode());
-        rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+        rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
         assertEquals("the date: " + rfc1123Format.format(d), response.getEntity(String.class));
         rfc1123Format.setTimeZone(TimeZone.getDefault());
 
@@ -254,7 +253,6 @@ public class WinkRequestMethodsTest exte
          */
         ClientResponse response = client.resource(getBaseURI() + "/context/request/timezone").get();
         assertEquals(200, response.getStatusCode());
-        String serverTimeZone = response.getEntity(String.class);
 
         DateFormat dateFormat =
             new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH); // DateFormat.getDateTimeInstance();
@@ -273,7 +271,7 @@ public class WinkRequestMethodsTest exte
             client.resource(getBaseURI() + "/context/request/date")
                 .header(HttpHeaders.IF_UNMODIFIED_SINCE, formatter.format(d)).get();
         assertEquals(200, response.getStatusCode());
-        rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+        rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
         assertEquals("the date: " + rfc1123Format.format(d), response.getEntity(String.class));
         rfc1123Format.setTimeZone(TimeZone.getDefault());
 
@@ -288,7 +286,7 @@ public class WinkRequestMethodsTest exte
         response = client.resource(getBaseURI() + "/context/request/date").get();
 
         assertEquals(200, response.getStatusCode());
-        rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+        rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
         assertEquals("the date: " + rfc1123Format.format(d), response.getEntity(String.class));
         rfc1123Format.setTimeZone(TimeZone.getDefault());
 
@@ -308,7 +306,7 @@ public class WinkRequestMethodsTest exte
                 .header(HttpHeaders.IF_UNMODIFIED_SINCE, lastModified).get();
 
         assertEquals(200, response.getStatusCode());
-        rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+        rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
         assertEquals("the date: " + rfc1123Format.format(d), response.getEntity(String.class));
         rfc1123Format.setTimeZone(TimeZone.getDefault());
 
@@ -338,7 +336,7 @@ public class WinkRequestMethodsTest exte
          * return 200 and the entity
          */
         assertEquals(200, response.getStatusCode());
-        rfc1123Format.setTimeZone(TimeZone.getTimeZone(serverTimeZone));
+        rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
         assertEquals("the date: " + rfc1123Format.format(d), response.getEntity(String.class));
         rfc1123Format.setTimeZone(TimeZone.getDefault());
 



Mime
View raw message