Add limit to Discover ES|QL queries to remove deprecation warnings (#202735)

## Summary

Resolves https://github.com/elastic/kibana/issues/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
This commit is contained in:
Lukas Olson 2024-12-11 06:18:11 -07:00 committed by GitHub
parent 771166bf7f
commit 162b1497b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();