Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-585

Reduce noisy output when running some CPE tests when run in Maven

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.2.1
    • Collection Processing
    • None

    Description

      Many CPE tests use ManageOutputDevice.setAllSystemOutputToNirvana() calls to attempt to stop expected error output from flooding the console. This works when the tests are run from Eclipse, but fails when run from Maven. This because the mechanism used is to swap in to System.err and System.out new print streams that throw away their output. However, if any logging occurs previous to this, the logger will initialize and copy the System.err, for example, so that subsequent setting of it has no effect on logging. When running from Maven, this happens.

      The fix is to use a different mechanism to stop the output due to logging: UIMAFramework.getLogger().setLevel(Level.OFF). Ideally this is surrounded by a try / finally block to insure it's put back to INFO.

      Attachments

        Activity

          People

            schor Marshall Schor
            schor Marshall Schor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: