You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by jchappelle <jc...@4redi.com> on 2008/11/07 18:04:37 UTC

WicketMockServlet-filestore question

I have started unit testing my wicket pages using the WicketTester class. For
now most of my tests just consist of something like this:

		WicketTester tester = getWicketTester();

		tester.startPage(new AdminPage());
		tester.assertRenderedPage(AdminPage.class);

For some reason every time I run a test I get a new folder under this path:

target/work/WicketMockServlet-filestore

And for each test I have a folder named something like
_d29c5f4_11d77e4b4d2_7ffc and inside that folder there is a text file called
pm-null with what looks like serialized objects in it.

Is there a way to turn this off or do I need to do some cleanup in my junit
tearDown method? 

Thanks

Josh


-- 
View this message in context: http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20384649.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: WicketMockServlet-filestore question

Posted by jchappelle <jc...@4redi.com>.
The target and the target/work folder are still getting created but I can
live with that. If you know of a quick and easy way to stop that from
happening then that would be great. Otherwise don't spend any time on it.

Thanks for your help.

Josh


igor.vaynberg wrote:
> 
> then you have to subclass your application, override newsessionstore
> and return httpsessionstore for your tests.
> 
> -igor
> 
> On Fri, Nov 7, 2008 at 10:51 AM, jchappelle <jc...@4redi.com> wrote:
>>
>> I am using version 1.3.4.
>>
>> I am creating my WicketTester by handing it my custom Application object
>> in
>> the constructor. The code I posted below is extending a BaseWicketTest
>> class
>> that I have created that has a getWicketTester() method in it.
>>
>> Thanks
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> looks like dummywebapplication, which the tester uses by default, uses
>>> HttpSessionStore which should not cause any directories to be created.
>>> what wicket version are you using?
>>>
>>> -igor
>>>
>>> On Fri, Nov 7, 2008 at 9:04 AM, jchappelle <jc...@4redi.com> wrote:
>>>>
>>>> I have started unit testing my wicket pages using the WicketTester
>>>> class.
>>>> For
>>>> now most of my tests just consist of something like this:
>>>>
>>>>                WicketTester tester = getWicketTester();
>>>>
>>>>                tester.startPage(new AdminPage());
>>>>                tester.assertRenderedPage(AdminPage.class);
>>>>
>>>> For some reason every time I run a test I get a new folder under this
>>>> path:
>>>>
>>>> target/work/WicketMockServlet-filestore
>>>>
>>>> And for each test I have a folder named something like
>>>> _d29c5f4_11d77e4b4d2_7ffc and inside that folder there is a text file
>>>> called
>>>> pm-null with what looks like serialized objects in it.
>>>>
>>>> Is there a way to turn this off or do I need to do some cleanup in my
>>>> junit
>>>> tearDown method?
>>>>
>>>> Thanks
>>>>
>>>> Josh
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20384649.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20386731.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20389450.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: how to replace 2.0's reAttach

Posted by Stefan Lindner <li...@visionet.de>.
Thanks Igor!

-----Ursprüngliche Nachricht-----
Von: Igor Vaynberg [mailto:igor.vaynberg@gmail.com] 
Gesendet: Freitag, 7. November 2008 22:14
An: users@wicket.apache.org
Betreff: Re: how to replace 2.0's reAttach

yes

-igor

On Fri, Nov 7, 2008 at 1:10 PM, Stefan Lindner <li...@visionet.de> wrote:
> What is the perfect way to replace the reattach method of wicket 2.0 in
> Wicket 1.4? Is it correct to replace the 2.0 expressioin
>
>        myComponent.reAttach()
>
> with
>
>        addOrReplace(myComponent);
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: how to replace 2.0's reAttach

Posted by Igor Vaynberg <ig...@gmail.com>.
yes

-igor

On Fri, Nov 7, 2008 at 1:10 PM, Stefan Lindner <li...@visionet.de> wrote:
> What is the perfect way to replace the reattach method of wicket 2.0 in
> Wicket 1.4? Is it correct to replace the 2.0 expressioin
>
>        myComponent.reAttach()
>
> with
>
>        addOrReplace(myComponent);
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


how to replace 2.0's reAttach

Posted by Stefan Lindner <li...@visionet.de>.
What is the perfect way to replace the reattach method of wicket 2.0 in
Wicket 1.4? Is it correct to replace the 2.0 expressioin

	myComponent.reAttach()

with

	addOrReplace(myComponent);

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: WicketMockServlet-filestore question

Posted by Igor Vaynberg <ig...@gmail.com>.
then you have to subclass your application, override newsessionstore
and return httpsessionstore for your tests.

-igor

On Fri, Nov 7, 2008 at 10:51 AM, jchappelle <jc...@4redi.com> wrote:
>
> I am using version 1.3.4.
>
> I am creating my WicketTester by handing it my custom Application object in
> the constructor. The code I posted below is extending a BaseWicketTest class
> that I have created that has a getWicketTester() method in it.
>
> Thanks
>
>
>
> igor.vaynberg wrote:
>>
>> looks like dummywebapplication, which the tester uses by default, uses
>> HttpSessionStore which should not cause any directories to be created.
>> what wicket version are you using?
>>
>> -igor
>>
>> On Fri, Nov 7, 2008 at 9:04 AM, jchappelle <jc...@4redi.com> wrote:
>>>
>>> I have started unit testing my wicket pages using the WicketTester class.
>>> For
>>> now most of my tests just consist of something like this:
>>>
>>>                WicketTester tester = getWicketTester();
>>>
>>>                tester.startPage(new AdminPage());
>>>                tester.assertRenderedPage(AdminPage.class);
>>>
>>> For some reason every time I run a test I get a new folder under this
>>> path:
>>>
>>> target/work/WicketMockServlet-filestore
>>>
>>> And for each test I have a folder named something like
>>> _d29c5f4_11d77e4b4d2_7ffc and inside that folder there is a text file
>>> called
>>> pm-null with what looks like serialized objects in it.
>>>
>>> Is there a way to turn this off or do I need to do some cleanup in my
>>> junit
>>> tearDown method?
>>>
>>> Thanks
>>>
>>> Josh
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20384649.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20386731.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: WicketMockServlet-filestore question

Posted by jchappelle <jc...@4redi.com>.
I am using version 1.3.4.

I am creating my WicketTester by handing it my custom Application object in
the constructor. The code I posted below is extending a BaseWicketTest class
that I have created that has a getWicketTester() method in it. 

Thanks



igor.vaynberg wrote:
> 
> looks like dummywebapplication, which the tester uses by default, uses
> HttpSessionStore which should not cause any directories to be created.
> what wicket version are you using?
> 
> -igor
> 
> On Fri, Nov 7, 2008 at 9:04 AM, jchappelle <jc...@4redi.com> wrote:
>>
>> I have started unit testing my wicket pages using the WicketTester class.
>> For
>> now most of my tests just consist of something like this:
>>
>>                WicketTester tester = getWicketTester();
>>
>>                tester.startPage(new AdminPage());
>>                tester.assertRenderedPage(AdminPage.class);
>>
>> For some reason every time I run a test I get a new folder under this
>> path:
>>
>> target/work/WicketMockServlet-filestore
>>
>> And for each test I have a folder named something like
>> _d29c5f4_11d77e4b4d2_7ffc and inside that folder there is a text file
>> called
>> pm-null with what looks like serialized objects in it.
>>
>> Is there a way to turn this off or do I need to do some cleanup in my
>> junit
>> tearDown method?
>>
>> Thanks
>>
>> Josh
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20384649.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20386731.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: WicketMockServlet-filestore question

Posted by Igor Vaynberg <ig...@gmail.com>.
looks like dummywebapplication, which the tester uses by default, uses
HttpSessionStore which should not cause any directories to be created.
what wicket version are you using?

-igor

On Fri, Nov 7, 2008 at 9:04 AM, jchappelle <jc...@4redi.com> wrote:
>
> I have started unit testing my wicket pages using the WicketTester class. For
> now most of my tests just consist of something like this:
>
>                WicketTester tester = getWicketTester();
>
>                tester.startPage(new AdminPage());
>                tester.assertRenderedPage(AdminPage.class);
>
> For some reason every time I run a test I get a new folder under this path:
>
> target/work/WicketMockServlet-filestore
>
> And for each test I have a folder named something like
> _d29c5f4_11d77e4b4d2_7ffc and inside that folder there is a text file called
> pm-null with what looks like serialized objects in it.
>
> Is there a way to turn this off or do I need to do some cleanup in my junit
> tearDown method?
>
> Thanks
>
> Josh
>
>
> --
> View this message in context: http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20384649.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org