[
https://issues.apache.org/jira/browse/SLING-651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633651#action_12633651
]
Bertrand Delacretaz commented on SLING-651:
-------------------------------------------
The SlingPostServletTest fails if the "Sling - Post servlet extensions" bundle
is started before the Sling POST servlet bundle.
To reproduce:
-Start launchpad/testing with "mvn jetty:run"
-In another terminal run " mvn test -Dtest=SlingPostServletTest" in the same
folder
-The test might pass or fail depending on startup order of the bundles
-Stop both "Sling - Default POST Servlets" and "Sling - Post servlet
extensions" bundles
-Restart "Sling - Post servlet extensions", and later "Sling - Default POST
Servlets"
The test fails.
The SlingPostServlet should account for post operations services that are
activated while the SlingPostServlet is inactive.
Other nitpicks:
-Typo in the module name, it's "extensions" not "extentions"
-Apache license missing from the LinkHelper class, and that class does not need
to be public
-Changes to the servlets/post/pom.xml are not needed
-In SlingPostServlet test I think you can replace this with the superclass's
getContent method:
final GetMethod getSource = new GetMethod(urlSource);
final int statusSource = httpClient.executeMethod(getSource);
assertEquals(urlSource + " must be accessible", 200, statusSource);
final String responseSourceBodyStr =
getSource.getResponseBodyAsString();
-If SlingPostServlet test extends RenderingTestBase you could use that class's
assertContains() method instead of
"assertTrue(responseTargetBodyStr.contains(target))", that would give better
failure messages.
> Extending the SlingPostServlet with SlingPostOperations
> -------------------------------------------------------
>
> Key: SLING-651
> URL: https://issues.apache.org/jira/browse/SLING-651
> Project: Sling
> Issue Type: Bug
> Components: Servlets Post
> Affects Versions: Servlets Post 2.0.2
> Reporter: Bertil Chapuis
> Assignee: Bertrand Delacretaz
> Priority: Minor
> Attachments: samples.diff, SlingPostServlet.diff
>
>
> As described in the documentation
> (http://incubator.apache.org/sling/site/manipulating-content-the-slingpostservlet.html),
> it should be possible to extend the SlingPostServlet with
> SlingPostOperations. However, in the SlingPostServlet, no methods allow to
> bind new operations.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.