Skip to content

Commit

Permalink
Attempt to harden lens flaky filter test (elastic#139861)
Browse files Browse the repository at this point in the history
  • Loading branch information
Constance authored Sep 1, 2022
1 parent d83720f commit f0cf292
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/functional/services/filter_bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export class FilterBarService extends FtrService {
private readonly common = this.ctx.getPageObject('common');
private readonly header = this.ctx.getPageObject('header');
private readonly retry = this.ctx.getService('retry');
private readonly config = this.ctx.getService('config');
private readonly defaultTryTimeout = this.config.get('timeouts.try');

/**
* Checks if specified filter exists
Expand Down Expand Up @@ -130,7 +132,7 @@ export class FilterBarService extends FtrService {
* filterBar.addFilter('extension', 'is one of', ['jpg', 'png']);
*/
public async addFilter(field: string, operator: string, ...values: any): Promise<void> {
await this.retry.try(async () => {
await this.retry.tryForTime(this.defaultTryTimeout * 2, async () => {
await this.testSubjects.click('addFilter');
await this.testSubjects.existOrFail('addFilterPopover');

Expand Down

0 comments on commit f0cf292

Please sign in to comment.