Skip to content

Commit

Permalink
Add limit to Discover ES|QL queries to remove deprecation warnings (e…
Browse files Browse the repository at this point in the history
…lastic#202735)

## Summary

Resolves elastic#196491.

Adds a `LIMIT` to our ES|QL Discover tests. Without the `LIMIT` we are
getting the following deprecation messages:

> Elasticsearch deprecation: 299
Elasticsearch-9.0.0-c74c06daee0583562c82597b19178268b9f415e5 "No limit
defined, adding default limit of [1000]"

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
  • Loading branch information
lukasolson authored Dec 11, 2024
1 parent 771166b commit 162b149
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/functional/apps/discover/esql/_esql_columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('should reset columns if available fields or index pattern are different in transformational query', async () => {
await monacoEditor.setCodeEditorValue('from logstash-* | keep ip, @timestamp');
await monacoEditor.setCodeEditorValue('from logstash-* | keep ip, @timestamp | limit 500');
await testSubjects.click('querySubmitButton');
await header.waitUntilLoadingHasFinished();
await discover.waitUntilSearchingHasFinished();
expect(await dataGrid.getHeaderFields()).to.eql(['ip', '@timestamp']);

// reset columns if available fields are different
await monacoEditor.setCodeEditorValue('from logstash-* | keep ip, @timestamp, bytes');
await monacoEditor.setCodeEditorValue(
'from logstash-* | keep ip, @timestamp, bytes | limit 500'
);
await testSubjects.click('querySubmitButton');
await header.waitUntilLoadingHasFinished();
await discover.waitUntilSearchingHasFinished();
Expand Down

0 comments on commit 162b149

Please sign in to comment.