[
https://issues.apache.org/jira/browse/WW-5030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17075714#comment-17075714
]
ASF subversion and git services commented on WW-5030:
-----------------------------------------------------
Commit 2e7a6b967e0b95576107073faa8c98caf7c2a428 in struts's branch
refs/heads/action-context-boost from JCgH4164838Gh792C124B5
[ https://gitbox.apache.org/repos/asf?p=struts.git;h=2e7a6b9 ]
Proposed implementation to address WW-5030.
Introduce new junit-portlet plugin.
- Utilizes a copy of org.springframework.mock.web.portlet package from
Spring 4.3.x, refactored to org.apache.struts2.mock.web.portlet. Also
copies one interface from org.apache.struts2.mock.web.portlet. The
package-info.java files identify the package renaming.
- Provides test cases for the mock objects.
- Modifies the portlet plugin to use the junit-portlet plugin as a
dependency. Adds a small boundary case fix for PortletRequestMap.
> ClassNotFoundException - MockPortletResponse
> --------------------------------------------
>
> Key: WW-5030
> URL: https://issues.apache.org/jira/browse/WW-5030
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Portlet
> Affects Versions: 2.5.18
> Reporter: John Bush
> Priority: Major
> Fix For: 2.6
>
> Attachments: TestStrutsPortlet.zip, fail.txt, success.txt
>
>
> WW-3826 solved a problem running JUnit tests on portlet actions that use the
> struts2-portlet-plugin and struts2-junit-plugin. The solution used Spring's
> org.springframework.mock.web.portlet package in the spring-test framework.
> Spring Portlet MVC is no longer supported (SPR-14129) and the package has
> been removed starting with Spring 5. I'm not able to upgrade to Spring 5
> without loosing my unit testing since having both versions of spring-test in
> my classpath creates many other issues.
> I've attached a zipped portlet project for testing (TestStrutsPortlet.zip),
> console log from a successful test (success.txt) and console log from a
> failed test (fail.txt). All that needs to change is the spring-version in the
> POM to recreate the testing.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)