rishabhdaim commented on code in PR #2147:
URL: https://github.com/apache/jackrabbit-oak/pull/2147#discussion_r1984885089
##########
oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndexTest.java:
##########
@@ -3123,7 +3125,8 @@ private String explain(String query){
private String explainXpath(String query) throws ParseException {
String explain = "explain " + query;
Result result = executeQuery(explain, "xpath", NO_BINDINGS);
- ResultRow row = Iterables.getOnlyElement(result.getRows());
+ Assert.assertEquals(1, StreamUtils.toStream(result.getRows()).count());
+ ResultRow row =
StreamUtils.toStream(result.getRows()).findAny().orElseThrow();
Review Comment:
@nfsantos I have changed this code, cause the underlying Iterable was
one-time use only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]