I am working on writing some junit tests for a project and am running into some rather odd behavior... it seems that tomcat is caching the servlets configuration data somewhere between tests. Here's what I'm doing...
Presently I have one TestCase class with two methods, let's call them testA() and testB(). Each method first copies a config directory into place inside the servlet's webapps folder. It then creates a new Embedded object, configures it with a custom connector I created, and starts up Tomcat. I then pass in a fabricated HTTP request and check the result against the expected response. These two particular tests happen to use the same servlet configuration, so to verify that things are acting weird, I changed testA() to copy in a non-working configuration. If I run testA() first, then it fails as expected. However, if I run testB() first and then testA() then both tests pass, verifying that testA is in fact using the leftover configuration from testB. I've additionally printed out the contents of the servlet's configuration directory AFTER copying the contents over, but BEFORE starting up tomcat to ensure the new configuration data is actually being copied over... which it is. Finally, I tried deleting the entire work/ directory between tests to ensure nothing was being cached in there. At this point, I'm somewhat at a loss. There appear to be no caches on the filesystem, and because I'm starting with a new Embedded object for each method, there shouldn't be any caches in memory. Any help would be greatly appreciated. -- Will Norris Shibboleth Project The University of Memphis --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
