Author: jbq
Date: Wed Feb 14 02:14:21 2007
New Revision: 507466

URL: http://svn.apache.org/viewvc?view=rev&rev=507466
Log:
Copy explanation of setResourcePollFrequency(null) from revision 496616 that
occured on branch 1.x

Modified:
    
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java?view=diff&rev=507466&r1=507465&r2=507466
==============================================================================
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java
 Wed Feb 14 02:14:21 2007
@@ -209,6 +209,16 @@
                                
.setRenderStrategy(RenderStrategy.ONE_PASS_RENDER);
                this.application.getResourceSettings().setResourceFinder(new 
WebApplicationPath(context));
                
this.application.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
                
this.application.getResourceSettings().setResourcePollFrequency(null);
 
                createRequestCycle();
@@ -533,4 +543,4 @@
                        dir.delete();
                }
        }
-}
\ No newline at end of file
+}


Reply via email to