diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java index 3d27386246c..5667053d914 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java @@ -440,8 +440,10 @@ public class SearchIT extends ESRestHighLevelClientTestCase { } finally { ClearScrollRequest clearScrollRequest = new ClearScrollRequest(); clearScrollRequest.addScrollId(searchResponse.getScrollId()); - ClearScrollResponse clearScrollResponse = execute(clearScrollRequest, highLevelClient()::clearScroll, - highLevelClient()::clearScrollAsync); + ClearScrollResponse clearScrollResponse = execute(clearScrollRequest, + // Not using a method reference to work around https://bugs.eclipse.org/bugs/show_bug.cgi?id=517951 + (request, headers) -> highLevelClient().clearScroll(request, headers), + (request, listener, headers) -> highLevelClient().clearScrollAsync(request, listener, headers)); assertThat(clearScrollResponse.getNumFreed(), greaterThan(0)); assertTrue(clearScrollResponse.isSucceeded());