Skip to content

Commit

Permalink
[ML] Functional transform tests - stabilize source selection (elastic…
Browse files Browse the repository at this point in the history
…#63087)

This PR adds a retry to the transform source selection service method for functional tests.
  • Loading branch information
pheyos authored Apr 9, 2020
1 parent 82e048a commit 7b0e9d0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';

export function TransformSourceSelectionProvider({ getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const retry = getService('retry');

return {
async assertSourceListContainsEntry(sourceName: string) {
Expand All @@ -23,8 +24,10 @@ export function TransformSourceSelectionProvider({ getService }: FtrProviderCont

async selectSource(sourceName: string) {
await this.filterSourceSelection(sourceName);
await testSubjects.clickWhenNotDisabled(`savedObjectTitle${sourceName}`);
await testSubjects.existOrFail('transformPageCreateTransform');
await retry.tryForTime(30 * 1000, async () => {
await testSubjects.clickWhenNotDisabled(`savedObjectTitle${sourceName}`);
await testSubjects.existOrFail('transformPageCreateTransform', { timeout: 10 * 1000 });
});
},
};
}

0 comments on commit 7b0e9d0

Please sign in to comment.