Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1837

Counting server.log messages gives false positive test failure.

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 3.5.1.Final, 4.0.0.Beta3
    • 4.0.0.Beta3
    • jaxrs
    • None

    Description

      SubResourceWarningTest.testWarningMsg:59 reports false positive for test failure
      because msgs in server.log are being counted. This methodology assumes a clean
      server.log for each integration test run. This does not happen when running
      a single test. The cmd to run a single test case is,

      mvn clean verify \
      -Dtest=SubResourceWarningTest -DfailIfNoTests=false \
      -fn -Dserver.home=/home/rsearls/j1/wfly10/wildfly/dist/wildfly-12.0.0.Final

      "verify" is a required maven goal. It runs the test. And -Dtest also runs the
      test. This doubles the existing msg count in the server.log The result for 3 consecutive runs are a accumulated msg count. This causes the test to fail.

      SubResourceWarningTest.testWarningMsg:59 Improper log WARNING count expected:<4> but was:<2>
      SubResourceWarningTest.testWarningMsg:59 Improper log WARNING count expected:<6> but was:<2>
      SubResourceWarningTest.testWarningMsg:59 Improper log WARNING count expected:<8> but was:<2>

      Some other method should be used to determine test success.

      Attachments

        Activity

          People

            rsearls r searls
            rsearls r searls
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: