Log4php
  1. Log4php
  2. LOG4PHP-66

LoggerConfiguratorBasicTest fails in "mvn test" but not in phpunit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: Code
    • Labels:
      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

        Activity

        Hide
        Christian Hammers added a comment -

        ...

        Show
        Christian Hammers added a comment - ...
        Hide
        Christian Grobmeier added a comment -

        Great catch, thanks much!!

        Applied with rv 798413

        Show
        Christian Grobmeier added a comment - Great catch, thanks much!! Applied with rv 798413

          People

          • Assignee:
            Unassigned
            Reporter:
            Christian Hammers
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development