You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (Jira)" <ji...@apache.org> on 2021/01/15 16:53:00 UTC
[jira] [Commented] (SLING-10065) make command servlet tests more
robust
[ https://issues.apache.org/jira/browse/SLING-10065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17266188#comment-17266188 ]
Bertrand Delacretaz commented on SLING-10065:
---------------------------------------------
FWIW, in case you have more similar needs later, in the GraphQL Core module we are [using jsonpath matchers|https://github.com/apache/sling-org-apache-sling-graphql-core/blob/3be37e2ef574d6f4da8ecabd147bb9cecef7671d/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorTest.java#L106] and I find them quite convenient.
> make command servlet tests more robust
> --------------------------------------
>
> Key: SLING-10065
> URL: https://issues.apache.org/jira/browse/SLING-10065
> Project: Sling
> Issue Type: Bug
> Components: Extensions
> Affects Versions: Pipes 4.0.0
> Reporter: Nicolas Peltier
> Assignee: Nicolas Peltier
> Priority: Major
> Fix For: Pipes 4.1.2
>
>
> [~sseifert] observed a build issue that is probably due to different implementation of EOL in json generation, or/and in test expectation on linux / windows. We should have a more robust way of testing validity of the json response
> {Quote}i've a problem running the unit tests on windows. surefire output see below.
> i assume there is a problem with line endings, can you fix the test that it is agnostic of unix/windows line endings?
>
> stefan
>
> -------------------------------------------------------------------------------
> Test set: org.apache.sling.pipes.internal.CommandExecutorImplTest
> -------------------------------------------------------------------------------
> Tests run: 17, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 4.657 s <<< FAILURE! - in org.apache.sling.pipes.internal.CommandExecutorImplTest
> org.apache.sling.pipes.internal.CommandExecutorImplTest.testFileCommandServlet Time elapsed: 0.39 s <<< FAILURE!
> org.junit.ComparisonFailure:
> expected:<...:content"],"size":5}[]
> > but was:<...:content"],"size":5}[
> ]
> >
> at org.apache.sling.pipes.internal.CommandExecutorImplTest.testFileCommandServlet(CommandExecutorImplTest.java:236)
>
> org.apache.sling.pipes.internal.CommandExecutorImplTest.testSimpleCommandServlet Time elapsed: 0.265 s <<< FAILURE!
> org.junit.ComparisonFailure:
> expected:<...tent/foo"],"size":1}[]
> > but was:<...tent/foo"],"size":1}[
> ]
> >
> at org.apache.sling.pipes.internal.CommandExecutorImplTest.testSimpleCommandServlet(CommandExecutorImplTest.java:200)
>
> org.apache.sling.pipes.internal.CommandExecutorImplTest.testChainedCommand Time elapsed: 0.263 s <<< FAILURE!
> org.junit.ComparisonFailure:
> expected:<...a/carrot"],"size":5}[]
> > but was:<...a/carrot"],"size":5}[
> ]
> >
> at org.apache.sling.pipes.internal.CommandExecutorImplTest.testChainedCommand(CommandExecutorImplTest.java:225)\{Quote}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)