Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-53774

InitUtilTest does not work as expected, it fails quietly with error logging, but junit still considers it is passing

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.0.0 M4
    • Fix Version/s: 7.0.0 M4
    • Component/s: Testing
    • Labels:

      Description

      [ivy:resolve] :: Apache Ivy 2.3.0 - 20130110142753 :: http://ant.apache.org/ivy/ ::
      [ivy:resolve] :: loading settings :: file = /home/trunks/git/liferay-portal/ivy-settings.xml
      [javac] Compiling 3 source files to /home/trunks/git/liferay-portal/portal-impl/test-classes/unit
      [javac] Note: /home/trunks/git/liferay-portal/portal-impl/test/unit/com/liferay/portal/search/lucene/LuceneHelperImplTest.java uses unchecked or unsafe operations.
      [javac] Note: Recompile with -Xlint:unchecked for details.
      [junit] Running com.liferay.portal.util.InitUtilTest
      [junit] Testsuite: com.liferay.portal.util.InitUtilTest
      [junit] Loading file:/home/trunks/git/liferay-portal/portal-impl/classes/system.properties
      [junit] Loading file:/home/trunks/git/liferay-portal/portal-impl/classes/portal.properties
      [junit] Loading file:/home/trunks/git/liferay-portal/portal-impl/classes/portal-ext.properties
      [junit] Loading file:/home/trunks/git/liferay-portal/portal-impl/test-classes/unit/portal-test.properties
      [junit] Loading file:/home/trunks/git/liferay-portal/portal-impl/test-classes/unit/portal-test-ext.properties
      [junit] 23:22:52,919 ERROR [main][ResourceActionsImpl:117] java.lang.NullPointerException
      [junit] java.lang.NullPointerException
      [junit] at com.liferay.portal.security.permission.ResourceActionsImpl.getPortletMimeTypeActions(ResourceActionsImpl.java:779)
      [junit] at com.liferay.portal.security.permission.ResourceActionsImpl.readPortletResource(ResourceActionsImpl.java:1086)
      [junit] at com.liferay.portal.security.permission.ResourceActionsImpl.read(ResourceActionsImpl.java:862)
      [junit] at com.liferay.portal.security.permission.ResourceActionsImpl.read(ResourceActionsImpl.java:652)
      [junit] at com.liferay.portal.security.permission.ResourceActionsImpl.read(ResourceActionsImpl.java:645)
      [junit] at com.liferay.portal.security.permission.ResourceActionsImpl.afterPropertiesSet(ResourceActionsImpl.java:113)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [junit] at java.lang.reflect.Method.invoke(Method.java:606)
      [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1639)
      [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1580)
      [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1510)
      [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
      [junit] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
      [junit] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
      [junit] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
      [junit] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
      [junit] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
      [junit] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:633)
      [junit] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
      [junit] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
      [junit] at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
      [junit] at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
      [junit] at com.liferay.portal.spring.context.ArrayApplicationContext.<init>(ArrayApplicationContext.java:31)
      [junit] at com.liferay.portal.spring.util.SpringUtil.loadContext(SpringUtil.java:41)
      [junit] at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:199)
      [junit] at com.liferay.portal.util.InitUtilTest.testBaseSeleniumTestCaseSpringConfigs(InitUtilTest.java:28)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [junit] at java.lang.reflect.Method.invoke(Method.java:606)
      [junit] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      [junit] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      [junit] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      [junit] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      [junit] at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      [junit] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      [junit] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      [junit] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      [junit] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      [junit] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      [junit] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      [junit] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      [junit] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      [junit] at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:532)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1179)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1030)
      [junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.743 sec
      [junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.743 sec

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brian.chan Brian Chan
              Reporter:
              shuyang.zhou Shuyang Zhou
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 33 weeks, 3 days ago

                  Packages

                  Version Package
                  7.0.0 M4