Description
The TCK test cases
- V2RequestTests_PortletRequest_ApiAction_getContextPath1
- V2RequestTests_PortletRequest_ApiEvent_getContextPath1
- V2RequestTests_PortletRequest_ApiResource_getContextPath1
test the following requirement:
Method getContextPath(): Returns a String representing the context path associated with the portlet.
The test cases does this by the following checking:
if(getctxtpath!=null && getctxtpath.startsWith("/tck-V2RequestTests")) {
where the expected context path is hard coded.
However, context path may be controlled by the container, with modification. Liferay uses Equinox Http Servlet as the servlet container in its OSGi environment, where web apps will have osgi.http.endpoint prepended to the beginning of the context path.
As a result, the context path for tck-V2RequestTests is "/o/tck-V2RequestTests". The TCK fail because the it assumes the container will do nothing to the context path.