You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by kn...@apache.org on 2007/04/20 01:44:43 UTC

svn commit: r530589 - in /incubator/wicket/trunk/jdk-1.4/wicket/src: main/java/org/apache/wicket/protocol/http/ test/java/org/apache/wicket/markup/

Author: knopp
Date: Thu Apr 19 16:44:42 2007
New Revision: 530589

URL: http://svn.apache.org/viewvc?view=rev&rev=530589
Log:
Fixed test failure when running with syatem locale different than english 

Modified:
    incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java
    incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTagTest.java
    incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTag_6.java

Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java?view=diff&rev=530589&r1=530588&r2=530589
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java Thu Apr 19 16:44:42 2007
@@ -517,7 +517,6 @@
 		this.wicketRequest = this.application.newWebRequest(servletRequest);
 		this.wicketResponse = this.application.newWebResponse(servletResponse);
 		createRequestCycle();
-		this.wicketSession = (WebSession)Session.findOrCreate();
 		this.application.getSessionStore().bind(wicketRequest, wicketSession);
 		wicketResponse.setAjax(wicketRequest.isAjax());
 	}

Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTagTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTagTest.java?view=diff&rev=530589&r1=530588&r2=530589
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTagTest.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTagTest.java Thu Apr 19 16:44:42 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.wicket.markup;
 
-import java.util.Locale;
-
 import org.apache.wicket.WicketTestCase;
 
 
@@ -92,7 +90,6 @@
 	public void testRenderHomePage_6() throws Exception
 	{
 		tester.getApplication().getMarkupSettings().setStripWicketTags(true);
-		tester.getWicketSession().setLocale(Locale.ENGLISH);
 	    executeTest(ComponentCreateTag_6.class, "ComponentCreateTagExpectedResult_6.html");
 	}
 }

Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTag_6.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTag_6.java?view=diff&rev=530589&r1=530588&r2=530589
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTag_6.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTag_6.java Thu Apr 19 16:44:42 2007
@@ -16,6 +16,9 @@
  */
 package org.apache.wicket.markup;
 
+import java.util.Locale;
+
+import org.apache.wicket.Session;
 import org.apache.wicket.markup.html.WebPage;
 
 
@@ -33,5 +36,7 @@
 	 */
 	public ComponentCreateTag_6() 
 	{
+		// bit of a hack, but before the instance is created we don't have access to this request's session
+		Session.get().setLocale(Locale.ENGLISH);
     }
 }



Re: svn commit: r530589 - in /incubator/wicket/trunk/jdk-1.4/wicket/src: main/java/org/apache/wicket/protocol/http/ test/java/org/apache/wicket/markup/

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* knopp@apache.org:
> Author: knopp
> Date: Thu Apr 19 16:44:42 2007
> New Revision: 530589
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=530589
> Log:
> Fixed test failure when running with syatem locale different than english 
> 
> Modified:
>     incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java
>     incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTagTest.java
>     incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/ComponentCreateTag_6.java
>  
>  
> @@ -33,5 +36,7 @@
>  	 */
>  	public ComponentCreateTag_6() 
>  	{
> +		// bit of a hack, but before the instance is created we don't have access to this request's session
> +		Session.get().setLocale(Locale.ENGLISH);
>      }
>  }

Hi Matej,

Is that WICKET-474?

It's a pity that we have to do a hack, since we were supposed to
be able to override the newSession() since Jonathan refactored the
code.
-- 
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/