ActiveMQ
  1. ActiveMQ
  2. AMQ-3623

Add DefaultTestAppender utility abstract class

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5.1
    • Fix Version/s: 5.6.0
    • Component/s: Test Cases
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Couple tests keep an eye on the logging for specific failures, be good to have a common approach to this.

        Issue Links

          Activity

          Hide
          Stan Lewis added a comment -

          Patch adds DefaultTestAppender and modifies the two existing tests to use it.

          Show
          Stan Lewis added a comment - Patch adds DefaultTestAppender and modifies the two existing tests to use it.
          Hide
          Gary Tully added a comment -

          improvement applied with thanks.
          note for the future, every new file needs the apache copyright header

          Show
          Gary Tully added a comment - improvement applied with thanks. note for the future, every new file needs the apache copyright header
          Hide
          Claudio Corsi added a comment -

          I looked at the patch and I just noticed that the appender is added to the logging system but it is not removed when the test has completed.

          Since the appender references the test case then the test case instance will never be reclaimed until the logging system is removed and that is when the application ends.

          Would you consider adding the code that remove the added appender when the test has completed.

          Show
          Claudio Corsi added a comment - I looked at the patch and I just noticed that the appender is added to the logging system but it is not removed when the test has completed. Since the appender references the test case then the test case instance will never be reclaimed until the logging system is removed and that is when the application ends. Would you consider adding the code that remove the added appender when the test has completed.
          Hide
          Stan Lewis added a comment -

          Yeah, totally agree, sorry I missed that. We get away with it currently because of the way the tests are run but it's best the test cleans that up, will attach a second patch momentarily.

          Show
          Stan Lewis added a comment - Yeah, totally agree, sorry I missed that. We get away with it currently because of the way the tests are run but it's best the test cleans that up, will attach a second patch momentarily.
          Hide
          Stan Lewis added a comment -

          Yeah, totally agree, sorry I missed that. We get away with it currently because of the way the tests are run but it's best the test cleans that up, will attach a second patch momentarily.

          Show
          Stan Lewis added a comment - Yeah, totally agree, sorry I missed that. We get away with it currently because of the way the tests are run but it's best the test cleans that up, will attach a second patch momentarily.
          Hide
          Stan Lewis added a comment -

          Created AMQ-3628 for the fix since this feature's been added.

          Show
          Stan Lewis added a comment - Created AMQ-3628 for the fix since this feature's been added.

            People

            • Assignee:
              Gary Tully
              Reporter:
              Stan Lewis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development