Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-1698

Maven surefire doesn't properly report some test failures

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.8
    • Fix Version/s: 1.13.0
    • Component/s: Testing / JUnit
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • Bugzilla Id:
      1623

      Description

      See NMS-1697 for some more examples and discussion.

      dj-gregors-computer:~/opennms/trunk/opennms/opennms-services dgregor$ ../build.sh -
      Dmaven.test.skip=false -Dtest=SpringLoaderTest test
      [INFO] Scanning for projects...
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building OpenNMS Services
      [INFO] task-segment: [test]
      [INFO] ----------------------------------------------------------------------------
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [WARNING]
      Artifact junit:junit:jar:3.8.1:test retains local scope 'test' overriding broader scope 'compile'
      given by a dependency. If this is not intended, modify or remove the local scope.

      [WARNING]
      Artifact oro:oro:jar:2.0.8:runtime retains local scope 'runtime' overriding broader scope 'compile'
      given by a dependency. If this is not intended, modify or remove the local scope.

      [WARNING]
      Artifact xerces:xercesImpl:jar:2.6.2:runtime retains local scope 'runtime' overriding broader scope
      'compile'
      given by a dependency. If this is not intended, modify or remove the local scope.

      [WARNING]
      Artifact javax.servlet:servlet-api:jar:2.3:provided retains local scope 'provided' overriding broader
      scope 'compile'
      given by a dependency. If this is not intended, modify or remove the local scope.

      [INFO] [compiler:compile]
      [INFO] Nothing to compile - all classes are up to date
      [INFO] [resources:testResources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:testCompile]
      [INFO] Nothing to compile - all classes are up to date
      [INFO] [surefire:test]
      [INFO] Surefire report directory: /Users/.dgregor/opennms/trunk/opennms/opennms-services/target/
      surefire-reports

      -------------------------------------------------------
      T E S T S
      -------------------------------------------------------
      Running org.opennms.netmgt.vmmgr.SpringLoaderTest
      log4j:WARN No appenders could be found for logger (org.springframework.core.CollectionFactory).
      log4j:WARN Please initialize the log4j system properly.
      Creating: TestDaemon
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'init-
      datasource-factory' defined in URL [jar:file:/Users/dgregor/.m2/repository/org/opennms/opennms-
      dao/1.3.2-SNAPSHOT/opennms-dao-1.3.2-SNAPSHOT.jar!/META-INF/opennms/applicationContext-
      dao.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: The
      OpenNMS home directory "/opt/OpenNMS" does not exist
      Caused by: java.io.FileNotFoundException: The OpenNMS home directory "/opt/OpenNMS" does not
      exist
      at org.opennms.netmgt.ConfigFileConstants.getConfigFileByName(ConfigFileConstants.java:704)
      at org.opennms.netmgt.config.DataSourceFactory.init(DataSourceFactory.java:125)
      at org.opennms.netmgt.config.DataSourceFactory.init(DataSourceFactory.java:110)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:258) at
      org.springframework.beans.factory.config.MethodInvokingFactoryBean.doInvoke
      (MethodInvokingFactoryBean.java:124)
      at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet
      (MethodInvokingFactoryBean.java:113)
      at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
      (AbstractAutowireCapableBeanFactory.java:877)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
      (AbstractAutowireCapableBeanFactory.java:846)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
      (AbstractAutowireCapableBeanFactory.java:419)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
      (AbstractBeanFactory.java:241)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
      (AbstractBeanFactory.java:152)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
      (DefaultListableBeanFactory.java:247)
      at org.springframework.context.support.AbstractApplicationContext.refresh
      (AbstractApplicationContext.java:331)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>
      (ClassPathXmlApplicationContext.java:92)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>
      (ClassPathXmlApplicationContext.java:77)
      at org.opennms.netmgt.vmmgr.SpringLoader.<init>(SpringLoader.java:59)
      at org.opennms.netmgt.vmmgr.SpringLoader.main(SpringLoader.java:145)
      at org.opennms.netmgt.vmmgr.SpringLoaderTest.testStart(SpringLoaderTest.java:53)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet
      (AbstractDirectoryTestSuite.java:135)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute
      (AbstractDirectoryTestSuite.java:160)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:81)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:182)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:743)
      ROOT CAUSE is java.io.FileNotFoundException: The OpenNMS home directory "/opt/OpenNMS" does not
      exist
      Exception occurred: java.io.FileNotFoundException: The OpenNMS home directory "/opt/OpenNMS"
      does not exist
      java.io.FileNotFoundException: The OpenNMS home directory "/opt/OpenNMS" does not exist
      at org.opennms.netmgt.ConfigFileConstants.getConfigFileByName(ConfigFileConstants.java:704)
      at org.opennms.netmgt.config.DataSourceFactory.init(DataSourceFactory.java:125)
      at org.opennms.netmgt.config.DataSourceFactory.init(DataSourceFactory.java:110)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:258) at
      org.springframework.beans.factory.config.MethodInvokingFactoryBean.doInvoke
      (MethodInvokingFactoryBean.java:124)
      at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet
      (MethodInvokingFactoryBean.java:113)
      at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
      (AbstractAutowireCapableBeanFactory.java:877)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
      (AbstractAutowireCapableBeanFactory.java:846)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
      (AbstractAutowireCapableBeanFactory.java:419)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
      (AbstractBeanFactory.java:241)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
      (AbstractBeanFactory.java:152)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
      (DefaultListableBeanFactory.java:247)
      at org.springframework.context.support.AbstractApplicationContext.refresh
      (AbstractApplicationContext.java:331)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>
      (ClassPathXmlApplicationContext.java:92)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>
      (ClassPathXmlApplicationContext.java:77)
      at org.opennms.netmgt.vmmgr.SpringLoader.<init>(SpringLoader.java:59)
      at org.opennms.netmgt.vmmgr.SpringLoader.main(SpringLoader.java:145)
      at org.opennms.netmgt.vmmgr.SpringLoaderTest.testStart(SpringLoaderTest.java:53)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet
      (AbstractDirectoryTestSuite.java:135)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute
      (AbstractDirectoryTestSuite.java:160)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:81)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:182)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:743)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] There are test failures.
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 11 seconds
      [INFO] Finished at: Wed Sep 20 20:05:37 EDT 2006
      [INFO] Final Memory: 8M/15M
      [INFO] ------------------------------------------------------------------------

        Attachments

          Activity

            People

            • Assignee:
              seth Seth Leger
              Reporter:
              dgregor DJ Gregor
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: