[
https://issues.apache.org/jira/browse/SLING-7509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16381819#comment-16381819
]
ASF GitHub Bot commented on SLING-7509:
---------------------------------------
rombert commented on a change in pull request #5: SLING-7509 - Add QueryClient
URL:
https://github.com/apache/sling-org-apache-sling-testing-clients/pull/5#discussion_r171520839
##########
File path:
src/main/java/org/apache/sling/testing/clients/query/QueryClient.java
##########
@@ -136,30 +128,42 @@ public JsonNode doQuery(final String query, final
QueryType type) throws ClientE
* @return total results returned by the query
* @throws ClientException if the request failed to execute
*/
- public long doCount(final String query, final QueryType type) throws
ClientException {
- return doQuery(query, type, false).get("total").getLongValue();
+ public long doCount(final String query, final QueryType type) throws
ClientException, InterruptedException {
+ return doQuery(query, type, false, false).get("total").getLongValue();
}
- protected JsonNode doQuery(final String query, final QueryType type, final
boolean showResults)
- throws ClientException {
+ /**
+ * Execute a query on the server and return only the number of rows in the
result
Review comment:
/s/return/returns/
(Again, sorry for nitpicking but since we have something to change...)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add QueryClient
> ---------------
>
> Key: SLING-7509
> URL: https://issues.apache.org/jira/browse/SLING-7509
> Project: Sling
> Issue Type: New Feature
> Components: Apache Sling Testing Clients
> Reporter: Valentin Olteanu
> Priority: Major
>
> Currently, there is no way to run queries in sling using the clients. This is
> needed in several tests to search content and assert the effects of a feature.
>
> The solution proposed in
> [https://github.com/apache/sling-org-apache-sling-testing-clients/pull/5]
> * installs a custom query servlet
> * runs the query in any of the supported format
> * returns results as json
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)