beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Feit <>
Subject Re: Beehive JPF and StrutsTestCase
Date Sat, 07 May 2005 00:14:58 GMT
Hi Brian,

We need to address JUnit testing of page flows in a serious way for 
1.1... but we shouldn't be breaking StrutsTestCase in 1.0.  Would you 
mind filing a bug on this 
(!default.jspa )?  The 
use of statics may be a larger issue, but at the very least we should 
uninitialize the config object when the Servlet is destroyed.

Glad you're pushing on this issue!


DeHamer, Brian wrote:

>Anyone had any luck getting StrutsTestCase for JUnit working with
>Beehive JPF?  I managed to get it mostly working, but have run into one
>My first test always executes fine, but before the second test is
>executed StrutsTestCase destroys and re-inits the servlet as it cycles
>the test fixutre.  When this happens I always get a
>ConfigInitializationException with a message that says "Config
>initialization already completed; unable to reload the NetUI config
>file".  I managed to track this down and it seems to be related to a
>static variable in the org.apache.beehive.netui.util.config.ConfigUtil
>class that gets set upon the servlet initialization, but is never unset
>-- even if the servlet is destroyed.  Since it's a static member of the
>ConfigUtil class the value sticks around even if I use a totally new
>instance of the PageFlowActionServlet on subsequent tests.
>At this point, my only work-around it to lump all of my tests into a
>single testcase so that the PageFlowActionServlet never gets cycled --
>obviously this isn't a very attractive solution.  I'd definitely be
>interested to hear from anyone that has dealt with this problem already
>or has an idea for another workaround.
>Thanks in advance.
>Brian DeHamer
>Hewlett-Packard Co.

View raw message