Author: frankbille
Date: Tue Jan 16 00:08:07 2007
New Revision: 496616

URL: http://svn.apache.org/viewvc?view=rev&rev=496616
Log:
Since the purpose of MockWebApplication is singlethreaded 
programmatic testing it doesn't make much sense to have a
modification watcher thread started to watch for changes in the
markup.
Disabling this also helps test suites with many test cases 
(problems has been noticed with >~300 test cases). The problem 
is that even if the wicket tester is GC'ed the modification 
watcher still runs, taking up file handles and memory, leading
to "Too many files opened" or a regular OutOfMemoryException

Modified:
    
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java?view=diff&rev=496616&r1=496615&r2=496616
==============================================================================
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java
 Tue Jan 16 00:08:07 2007
@@ -214,6 +214,17 @@
                getResourceSettings().setResourceFinder(new 
WebApplicationPath(context));
                getPageSettings().setAutomaticMultiWindowSupport(false);
                
+               // Since the purpose of MockWebApplication is singlethreaded 
+               // programmatic testing it doesn't make much sense to have a
+               // modification watcher thread started to watch for changes in 
the
+               // markup.
+               // Disabling this also helps test suites with many test cases 
+               // (problems has been noticed with >~300 test cases). The 
problem 
+               // is that even if the wicket tester is GC'ed the modification 
+               // watcher still runs, taking up file handles and memory, 
leading
+               // to "Too many files opened" or a regular OutOfMemoryException
+               getResourceSettings().setResourcePollFrequency(null);
+               
                createRequestCycle();
        }
 


Reply via email to