Skip to content

Commit 162b149

Browse files
authored
Add limit to Discover ES|QL queries to remove deprecation warnings (#202735)
## Summary Resolves #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
1 parent 771166b commit 162b149

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/functional/apps/discover/esql/_esql_columns.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
181181
});
182182

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

190190
// reset columns if available fields are different
191-
await monacoEditor.setCodeEditorValue('from logstash-* | keep ip, @timestamp, bytes');
191+
await monacoEditor.setCodeEditorValue(
192+
'from logstash-* | keep ip, @timestamp, bytes | limit 500'
193+
);
192194
await testSubjects.click('querySubmitButton');
193195
await header.waitUntilLoadingHasFinished();
194196
await discover.waitUntilSearchingHasFinished();

0 commit comments

Comments
 (0)