From: David S. <sa...@mi...> - 2007-07-03 18:57:02
|
Jonathan, I have not used Spring directly, so learning a bit more will probably help me in the future. Are you directly shutting down the application contexts, or should that happen automatically at garbage collection? If you create a lot of application contexts in a loop, do you see similar results to what you saw for JUnit? JUnit 3 did indeed create all of the instance fields for all test objects at once, but this is intentionally fixed in JUnit 4. Can you give me an example of how your tests look that would help me figure out whether JUnit can do something more to help your situation? David On 7/3/07, Jonathan Alvarsson <jon...@gm...> wrote: > It is the Spring application context. I solved it now by using just one > static reference to one aplication context instead so now I guess I have > quite some time until I will run out of memery next time... > > The principal problem still exists for JUnit though... > > > On 7/3/07, David Saff <sa...@mi...> wrote: > > (I accidentally dropped the thread from the list. CC'ing the list to > > get them up to date.) > > > > My best guess is that the "fork" being discussed is the option on the > > junit task in ant. > > > > What are you allocating memory-wise for each test? Thanks, > > > > David > > > > On 7/3/07, Jonathan Alvarsson <jon...@gm...> wrote: > > > On 6/28/07, David Saff <sa...@mi... > wrote: > > > > Jonathan, > > > > > > > > Are you using JUnit 3? If so, a move to JUnit 4 should help a lot. > > > > It will require a small amount of rewrite of the test code, but the > > > > memory usage profile should be much more reasonable. Thanks, > > > > > > Okey so I changed some code into JUnit 4 compatible. But this didn't > > > change much. It's still the same. When I run all tests in my package > > > the test run turns really slow after just about half of the tests but > > > those tests run at normal speed if runned separately... > > > > > > Someone said somthing about fork. Do you know anything about that? > > > > > > // Jonathan > > > > > > > > > -- > // Jonathan |