[
https://issues.apache.org/jira/browse/WW-5030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17070031#comment-17070031
]
James Chaplin edited comment on WW-5030 at 3/29/20, 2:44 PM:
-------------------------------------------------------------
Hello John.
The intention was to consider a plugin which could enable continued usage of a
subset of portlet-related mocks from spring-test (Spring 4.3.x). It was hoped
it could provide the mock functionality without introducing a new dependency
for Struts 2 on PortletMVC4Spring (simply for the mocks).
It was just an initial attempt, and the choice of plugin name may not have been
the best. ;) A refactored version, named portlet-mocks-plugin (as suggested
by Lukasz - along with some other changes he also suggested), has been applied
via updates to the PR. It should be a cleaner plugin implementation now at any
rate.
Regards,
James.
(*Edited*: Corrected reference to spring-webmvc-portlet above, as per John's
comment below. There was a single mock related to this package, but it was not
the principal package involved.)
was (Author: jchaplin):
Hello John.
The intention was to consider a plugin which could enable continued usage of a
subset of portlet-related mocks from spring-test (Spring 4.3.x). It was hoped
it could provide the mock functionality without introducing a new dependency
for Struts 2 on PortletMVC4Spring (simply for the mocks).
It was just an initial attempt, and the choice of plugin name may not have been
the best. ;) A refactored version, named portlet-mocks-plugin (as suggested
by Lukasz - along with some other changes he also suggested), has been applied
via updates to the PR. It should be a cleaner plugin implementation now at any
rate.
Regards,
James.
(*Edited*: Corrected incorrect reference to spring-webmvc-portlet above, as per
John's comment below)
> 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)