jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas.CHALUM...@arsoe-trelaze.com
Subject Re: Infinite Recursion when using suite method in cactus
Date Fri, 19 Nov 2004 08:47:39 GMT
Normal. It is a programmation error : return suite; instead of return suite(); will solve your
problem





"tanmay_ambre" <tanmay_ambre@infosys.com>
19/11/2004 06:03
Veuillez répondre à "Cactus Users List"

 
        Pour :  <cactus-user@jakarta.apache.org>
        cc : 
        Objet : Infinite Recursion when using suite method in cactus


Hi,
 
I have written a TestSuite which has a public static Test suite() method
in it. The method implementation is as follows:
 
    public static Test suite()
    {
        ServletTestSuite suite = new ServletTestSuite();
        suite.addTest(new TestCactusDelegate("testGetCustInfo"));
        return suite();
    }
 
Whenever I try running this test case using Browser Integration or Ant
integration, the program goes in an infinite recursive loop. 
 
For running the unittests I use the following jars in the classpath. I
also use cactifywar to create a war file for unit testing. The app
server is Weblogic 8.1
 
aspectjrt-1.1.1.jar
cactus-1.6.1.jar
cactus-ant-1.6.1.jar
commons-httpclient-2.0.2.jar
commons-logging-1.0.3.jar
httpunit-1.5.4.jar
junit-3.8.1.jar
nekohtml-0.7.4.jar
 
 
Following is the trace from a log file. This trace gets repeated
infinitely.
 
 
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
<setDelegatedTest([testGetCustInfo(be.telenet.unittest.testcactus.testwe
bclient.testdelegate.TestCactusDelegate)])
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
>setDelegatedTest
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
<setWrappedTest([null])
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
>setWrappedTest
[DEBUG][org.apache.cactus.ServletTestSuite]:
<addTest([testGetCustInfo(be.telenet.unittest.testcactus.testwebclient.t
estdelegate.TestCactusDelegate)])
[DEBUG][org.apache.cactus.ServletTestSuite]: >addTest
 
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
<setDelegatedTest([testGetCustInfo(be.telenet.unittest.testcactus.testwe
bclient.testdelegate.TestCactusDelegate)])
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
>setDelegatedTest
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
<setWrappedTest([null])
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
>setWrappedTest
[DEBUG][org.apache.cactus.ServletTestSuite]:
<addTest([testGetCustInfo(be.telenet.unittest.testcactus.testwebclient.t
estdelegate.TestCactusDelegate)])
[DEBUG][org.apache.cactus.ServletTestSuite]: >addTest
 
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
<setDelegatedTest([testGetCustInfo(be.telenet.unittest.testcactus.testwe
bclient.testdelegate.TestCactusDelegate)])
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
>setDelegatedTest
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
<setWrappedTest([null])
[DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]:
>setWrappedTest
[DEBUG][org.apache.cactus.ServletTestSuite]:
<addTest([testGetCustInfo(be.telenet.unittest.testcactus.testwebclient.t
estdelegate.TestCactusDelegate)])
[DEBUG][org.apache.cactus.ServletTestSuite]: >addTest
 
Warm Regards,
 
tanmay ambre,
Infosys Technologies Ltd,
Pune, India.
 
(O) +91-20-22973681
(m) +91-9850414331
 
 




Mime
View raw message