So, my build engineer let me know the other day that our unit tests were taking longer and longer to run on our Jenkins server. They would run in about 14 seconds locally, but took 5-6 minutes on that server. A quick look at the stack traces, showed an inordinate amount of time writing the class files to disk for MockBox’s mocks (which have randomly generated names). I looked in the cfclasses directory on that server and found 1.2 Million class files which had been accumulating since November 2011. I deleted them (which was no easy task since Windows HATES large directory listings) which put performance back to normal. I’ve noted that several thousand new class files get created every time we run our unit tests suite so I am concerned about this being a re-ocurring issue.
- I always assumed CF cleaned those disk files up after a while. Is that not the case?
- Has anyone else run in to this? (If you run unit tests regularly, check your \wwwroot\WEB-INF\cfclasses directory and see)
- Is there anything MockBox can do differently to reduce the number of templates that CF wants to cache?
ColdBox Platform Evangelist
Ortus Solutions, Corp