Uploaded image for project: 'Cactus'
  1. Cactus
  2. CACTUS-235

TestShareAll suite adds TestHttpSession tests incorrectly

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7.1
    • 1.8
    • Servlet Sample
    • None
    • Windows XP, WSAD 5.1.2

    Description

      The method org.apache.cactus.sample.servlet.unit.TestShareAll.suite() adds the TestHttpSession tests to the suite incorrectly. It doesn't call TestHttpSession.suite(), so the tests are not properly set up, and as a result TestHttpSession.beginDependentTestUsingSession2(WebRequest) throws a null-pointer exception (because this.dependentTest is null).

      I found this problem when running the Cactus sample tests through a web browser (http://localhost:9080/testweb/ServletTestRunner?suite=org.apache.cactus.sample.servlet.unit.TestShareAll).

      The patch follows.

      /jeff

      — TestShareAll.java.orig 2006-01-06 14:54:00.663897700 -0500
      +++ TestShareAll.java 2006-01-06 14:54:32.600776000 -0500
      @@ -55,7 +55,7 @@
      suite.addTestSuite(TestHttpUnitIntegration.class);
      suite.addTestSuite(TestServletRedirectorOverride.class);
      suite.addTestSuite(TestHttpParameters.class);

      • suite.addTestSuite(TestHttpSession.class);
        + suite.addTest(TestHttpSession.suite());
        suite.addTestSuite(TestHttpResponse.class);
        suite.addTestSuite(TestCookie.class);
        suite.addTestSuite(TestRequestDispatcher.class);

      Attachments

        Activity

          People

            paranoiabla Petar Tahchiev
            jglass Jeff Glass
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment