Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1208

Start stream capture before loading tests

    XMLWordPrintableJSON

    Details

      Description

      If, when scanClassPath() runs, a class is loaded and that loading process produces a log (via log4j in our case), the logging framework creates its console appender around the current stdout stream, before the stream is replaced to start the redirection of stdout and stderr to a file (when redirectTestOutputToFile is used). The consequences are that stdout gets flooded with logs (i.e. redirectTestOutputToFile doesn't work).

      Scanning the classpath after the capture is started, fixed the issue.

      I believe that other providers have the same issue.

        Attachments

          Activity

            People

            • Assignee:
              tibordigana Tibor Digana
              Reporter:
              tibordigana Tibor Digana
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: