Details
-
Bug
-
Status: Closed
-
Resolution: Won't Fix
-
7.0.0 M5
-
None
-
None
-
3
Description
Trying to use LiferayIntegrationTestRule on plugin integration tests results in failure and a stack trace. Without this rule, annotations such as @DeleteAfterTestRun are useless.
Steps to reproduce
You are expected to have both liferay-portal and liferay-plugins repositories on your machine for these tests.
- Set up a Liferay bundle with ant -f build-dist.xml setup-testable-tomcat called from liferay-portal
- Start up Liferay.
- In liferay-plugins, replace portlets/calendar-portlet/test/integration/com/liferay/calendar/service/CalendarLocalServiceTest.java with the attached version (or fetch the branch from https://github.com/brandizzi/liferay-plugins/commits/LPS-54258)
- Inside the calendar-portlet project, run ant test-integration
Expected results
- The test would pass
Actual results
- The test fails, the following stack trace is logged:
[junit] Testcase: com.liferay.calendar.service.CalendarLocalServiceTest: Caused an ERROR [junit] Could not create statement [junit] java.lang.RuntimeException: Could not create statement [junit] at org.jboss.arquillian.junit.Arquillian.methodBlock(Arquillian.java:306) [junit] at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:202) [junit] at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:377) [junit] at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:52) [junit] at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:216) [junit] at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:164) [junit] Caused by: java.lang.reflect.InvocationTargetException [junit] at org.jboss.arquillian.junit.Arquillian.methodBlock(Arquillian.java:259) [junit] Caused by: java.lang.ExceptionInInitializerError [junit] at com.liferay.portal.test.rule.LiferayIntegrationTestRule.apply(LiferayIntegrationTestRule.java:50) [junit] Caused by: java.lang.NullPointerException [junit] at java.util.Hashtable.put(Hashtable.java:514) [junit] at java.util.Properties.setProperty(Properties.java:161) [junit] at java.lang.System.setProperty(System.java:787) [junit] at com.liferay.portal.kernel.util.SystemProperties.set(SystemProperties.java:171) [junit] at com.liferay.portal.util.PropsUtil.<init>(PropsUtil.java:183) [junit] at com.liferay.portal.util.PropsUtil.<clinit>(PropsUtil.java:348)
Attachments
Issue Links
- relates
-
LPS-52483 As a developer, I should be able to use test util classes (such as GroupTestUtil) at plugins' integration tests
-
- Closed
-
- links to