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

Running simple tests on a minimal db throws exceptions

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.1.X EE, 6.2.0 CE RC3
    • Fix Version/s: 6.1.X EE, 6.2.0 CE RC4
    • Component/s: Testing
    • Labels:
      None
    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed

      Description

      Go to portal-impl

      ant test-class -Dtest.class=RoleFinderTest

      ava.lang.IndexOutOfBoundsException: Index: 0
      [junit] at java.util.Collections$EmptyList.get(Collections.java:2976)
      [junit] at com.liferay.portal.util.TestPropsValues.getUser(TestPropsValues.java:190)
      [junit] at com.liferay.portal.service.ServiceTestUtil.initPermissions(ServiceTestUtil.java:182)
      [junit] at com.liferay.portal.test.EnvironmentExecutionTestListener.runBeforeClass(EnvironmentExecutionTestListener.java:35)
      [junit] at com.liferay.portal.kernel.test.TestContextHandler.runBeforeTestClasses(TestContextHandler.java:68)
      [junit] at com.liferay.portal.kernel.test.RunBeforeTestClassesCallback.evaluate(RunBeforeTestClassesCallback.java:34)
      [junit] at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      [junit] at com.liferay.portal.kernel.test.RunAfterTestClassesCallback.evaluate(RunAfterTestClassesCallback.java:42)
      [junit] at com.liferay.portal.test.LiferayIntegrationJUnitTestRunner$1$1.run(LiferayIntegrationJUnitTestRunner.java:59)

      Tests still pass, because the finder technically works. But it's throwing an exception because of the minimal database that doesn't have an admin user.

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              brian.chan Brian Chan
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 35 weeks, 5 days ago

                Packages

                Version Package
                6.1.X EE
                6.2.0 CE RC4