jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Ho <sebasti...@bii.a-star.edu.sg>
Subject Always getting AssertFailedError
Date Thu, 02 Sep 2004 06:23:59 GMT
Hi

I keep getting the AssertFailedError when using cactus. Why is that?

Thanks

Sebastian Ho

----------------------------
My test
----------------------------
import junit.framework.Test;
import junit.framework.TestSuite;

import org.apache.cactus.ServletTestCase;


public class ProjectTest extends ServletTestCase
{
    
   public ProjectTest(String name)
    {
        super(name);
    }

    public static Test suite()
    {
        return new TestSuite(ProjectTest.class);
    }

    public void setUp() throws Exception
    {
    }

    public void testCreateProject() //throws Exception 
    {
    	assertEquals(true, true);	
    }
}

--------------------------------------
My ANT output
--------------------------------------

[sebastian@localhost FlamingoCactus]$ ant test
Buildfile: build.xml
 
clean:
   [delete] Deleting directory
/home/sebastian/eclipse/workspace/FlamingoCactus/target
   [delete] Deleting directory
/home/sebastian/eclipse/workspace/FlamingoCactus/dist
 
init:
 
compile.cactus:
    [mkdir] Created dir:
/home/sebastian/eclipse/workspace/FlamingoCactus/target
    [javac] Compiling 1 source file to
/home/sebastian/eclipse/workspace/FlamingoCactus/target
 
war:
      [war] Building war:
/home/sebastian/eclipse/workspace/FlamingoCactus/target/flamingo.war
      [war] Warning: selected war files include a WEB-INF/web.xml which
will be ignored (please use webxml attribute to war task)
 
dist:
     [copy] Copying 1 file to
/home/sebastian/eclipse/workspace/FlamingoCactus/dist
 
cactify:
[cactifywar] Analyzing war:
/home/sebastian/eclipse/workspace/FlamingoCactus/dist/flamingo.war
[cactifywar] Building war:
/home/sebastian/eclipse/workspace/FlamingoCactus/dist/flamingocactus.war
 
test:
   [cactus]
-----------------------------------------------------------------
   [cactus] Running tests against JBoss 3.2.3
   [cactus]
-----------------------------------------------------------------
   [cactus] Running ProjectTest
   [cactus] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 1.821
sec
   [cactus] Testsuite: ProjectTest
   [cactus] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 1.821
sec
 
   [cactus] Testcase: testCreateProject(ProjectTest):   FAILED
   [cactus] null
   [cactus] junit.framework.AssertionFailedError
   [cactus]     at ProjectTest.testCreateProject(ProjectTest.java:46)
   [cactus]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
   [cactus]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   [cactus]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   [cactus]     at
org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
   [cactus]     at
org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
   [cactus]     at
org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
   [cactus]     at
org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:117)
   [cactus]     at
org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
   [cactus]     at
org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
   [cactus]     at
org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:117)
   [cactus]     at
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
   [cactus]     at
org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
   [cactus]     at
org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:117)
   [cactus]     at
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
   [cactus]     at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
   [cactus]     at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   [cactus]     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
   [cactus]     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
   [cactus]     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   [cactus]     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   [cactus]     at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   [cactus]     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   [cactus]     at
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   [cactus]     at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   [cactus]     at
org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   [cactus]     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   [cactus]     at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   [cactus]     at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
   [cactus]     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   [cactus]     at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   [cactus]     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   [cactus]     at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   [cactus]     at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   [cactus]     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   [cactus]     at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   [cactus]     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
   [cactus]     at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   [cactus]     at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   [cactus]     at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   [cactus]     at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
   [cactus]     at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
   [cactus]     at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
   [cactus]     at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
   [cactus]     at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
   [cactus]     at java.lang.Thread.run(Thread.java:534)
 
 
   [cactus] TEST ProjectTest FAILED
 
BUILD SUCCESSFUL
Total time: 22 seconds



Mime
View raw message