Uploaded image for project: 'Log4php'
  1. Log4php
  2. LOG4PHP-66

LoggerConfiguratorBasicTest fails in "mvn test" but not in phpunit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Code
    • None

    Description

      That was one ugly bug... luckily I had experienced something like this using PHPUnit some years ago:

      Quoting from my patch:

      // As PHPUnit runs all tests in one run, there might be some loggers left over
      // from previous runs. ResetConfiguration() only clears the appenders, it does
      // not remove the categories!

      That explains why a simple "phpunit configurators/LoggerConfiguratorBasicTest" always succeeded but a "mvn test" at least for me never.
      Using print_r I could see two loggers named "test" and "mylogger", strings that are used as logger names in completely different test files.

      bye,

      christian

      Attachments

        Activity

          People

            Unassigned Unassigned
            lathspell Christian Brunotte
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: