Hello,
Vincent Massol wrote:
I'm not quite sure if my use case is wrong for cactus. What I am doing is deploying und undeploying cactified webapplications each with its own cactus.jar, ServletRedirector and tests. The Tomcat gets not restarted between the test applications.Hi Volker,
Your use case (using the same cactus installation to test different web applications) is not supported by Cactus. I'm actually surprised it could work at all! :-)
The way to run Cactus tests on a given web application is by cactifying this web application. So if you have 2 web applications, you're supposed to cactify 2 web applications, each installing its own cactus redirectors.
This means that it was pure luck that Cactus was working for you before... ;-)
That said, I'm curious to understand better your use case as I'm always happy to improve Cactus. I have a few questions:
- where are the cactus tests located? In test1 webapp? In test2 webapp? In another webapp? - in which webapp are the cactus redirectors installed?
Like Kazuhito wrote, the lifetime of the system property is the point, it does not get deleted after an redeployment of an webapplication. So the new System.setProperties is never called, because we still got that property from the previous application.Also, the call to setSystemProperties() happen in the doGet() method, i.e. for each call to the Servlet Test Runner. Thus, if the contextURL property changes, it should work fine, no? It means that you would need to change this property between your 2 webapp tests, which seems normal to me. What am I missing?
But you are wright, when I manualy set the property in each application everything works fine. But I can only do this by calling System.setProperties("cactus.contextURL"...) in each test application. If I try to use the cactus.properties it gets ignored (I think that is what Kazuhito also meant).
Maybe one easy way to get rid of the system property is to delete it when ServletTestRunner gets undeployed. Than anything should work like before.
thanks,
Volker
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
