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

Surefire swallows serious errors in fork mode "once"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.3
    • None
    • classloading
    • None

    Description

      suerfire-reports is not created, so there is no where to check the error

      [INFO] [surefire:test]
      [INFO] Surefire report directory: C:\p4store\...\target\surefire-reports
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] There are test failures.
      [INFO] ------------------------------------------------------------------------

      The only way I see the actual error, is by setting forkMode=never.

      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Unable to instantiate POJO 'class com.XXX.TestAp
      plicationEvent'; nested exception is java.lang.InstantiationException: com.XXX.TestApplicationEvent; nested exception is org.apache.mav
      en.surefire.testset.TestSetFailedException: Unable to instantiate POJO 'class co
      m.XXXX.TestApplicationEvent'; nested exception is java.l
      ang.InstantiationException: com.XXX.TestApplicationEven
      t

      In this case the exception is caused by surefire detecting TestApplicationEvent as a test when it is not. Once I adjusted the excludes, I got the tests running.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yuri Yuri Schimke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: