Uploaded image for project: 'Codehaus Cargo'
  1. CARGO-647

container.stop() doesn't always work in AbstractWarCapabilityContainerTestCase

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 0.9
    • Fix versions: 1.0
    • Components: Core
    • Labels:
      None

      Description

      during tomcat4x testing, I found that a calls to container.stop() aren't safely handled.

      getLocalContainer().start();
      PingUtils.assertPingTrue(warPingURL.getPath()+" not started", warPingURL, getLogger());

      getLocalContainer().stop();
      PingUtils.assertPingFalse(warPingURL.getPath()+" not stopped", warPingURL, getLogger());

      In this, since the stop() is not in a finally block, it may not be called, and then cause later tests to be unstable. Our tests must ensure that they clear resources upon shutdown. In junit, the best place to put these assurance is in the tearDown() method.

      Please do so.

        Attachments

          Activity

            People

            • Assignee:
              adriancole Adrian Cole (Inactive)
              Reporter:
              adriancole Adrian Cole (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: