Skip to content

Commit

Permalink
[ML] Functional transform tests - stabilize source selection (#63087)
Browse files Browse the repository at this point in the history
This PR adds a retry to the transform source selection service method for functional tests.
  • Loading branch information
pheyos committed Apr 9, 2020
1 parent e8caa06 commit a4a9456
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 a4a9456

Please sign in to comment.