That sounds like a lovely inner class for WicketTester.

tester = new WicketTester(new WicketTester.NonCachingWebApplication());


On 7/13/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > I noted that each individual test package (say 200 test cases) was running
> > twice as slow as before.  I improved this dramatically by calling
> > "getDebugSettings().setComponentUseCheck(false);"
>
> The slow down is because of recording partial stacktraces when in
> development mode. But for the next version, that's not the default
> anymore (see a vote last week on this).
>
> > in development mode (not ideal),
>
> Like others said: preferably don't run unit tests in development mode.
> Not much wrong with it per se, but you don't need the extra checks and
> output for unit tests in the first place (and in deployment mode
> you'll be closer to what your actual deployment should be).
>
> > and this improved the running time of each individual test package
> > back to something like its previous value.  But, when running the full suite
> > (several packages, in either Maven or Eclipse), the tests still get
> > progressively slower until the OutOfMemory error is raised.
>
> This might be because recently the default session store for unit
> tests was set to HttpSessionStore (instead of
> SecondLevelCacheSessionStore). Uses less threads and no diskaccess,
> which should speed up the test execution, but also uses more memory.
>
> I think that, as long as you are not testing back button behavior, you
> could best do this:
>
>                 WebApplication myApplication = new DummyWebApplication()
>                 {
>                         protected ISessionStore newSessionStore()
>                         {
>                                 return new SecondLevelCacheSessionStore(this, 
> new IPageStore()
>                                 {
>
>                                         public void destroy()
>                                         {
>                                         }
>
>                                         public Page getPage(String sessionId, 
> String pagemap, int id, int
> versionNumber,
>                                                         int ajaxVersionNumber)
>                                         {
>                                                 return null;
>                                         }
>
>                                         public void pageAccessed(String 
> sessionId, Page page)
>                                         {
>                                         }
>
>                                         public void removePage(String 
> sessionId, String pagemap, int id)
>                                         {
>                                         }
>
>                                         public void storePage(String 
> sessionId, Page page)
>                                         {
>                                         }
>
>                                         public void unbind(String sessionId)
>                                         {
>                                         }
>                                 });
>                         }
>                 };
>
>                 tester = new WicketTester(myApplication);
>
> Which only holds the current page in memory and immediately discards
> the older ones.
>
> Could give that a try and let us know whether that helped?
>
> Thanks,
>
> Eelco
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Scott Swank
reformed mathematician

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to