Skip to content

Commit

Permalink
Stability fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pheyos committed Nov 26, 2019
1 parent 30fe0c1 commit 53be053
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ export function MachineLearningJobManagementProvider(
},

async assertStartDatafeedModalExists() {
// this retry can be removed as soon as #48734 is merged
await retry.tryForTime(5000, async () => {
await testSubjects.existOrFail('mlStartDatafeedModal');
});
await testSubjects.existOrFail('mlStartDatafeedModal', { timeout: 5000 });
},

async confirmStartDatafeedModal() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,7 @@ export function MachineLearningJobWizardAdvancedProvider({
},

async assertCreateDetectorModalExists() {
// this retry can be removed as soon as #48734 is merged
await retry.tryForTime(5000, async () => {
await testSubjects.existOrFail('mlCreateDetectorModal');
});
await testSubjects.existOrFail('mlCreateDetectorModal', { timeout: 5000 });
},

async assertDetectorFunctionInputExists() {
Expand Down Expand Up @@ -298,18 +295,17 @@ export function MachineLearningJobWizardAdvancedProvider({
},

async clickEditDetector(detectorIndex: number) {
await testSubjects.click(
`mlAdvancedDetector ${detectorIndex} > mlAdvancedDetectorEditButton`
);
await this.assertCreateDetectorModalExists();
retry.tryForTime(20 * 1000, async () => {
await testSubjects.click(
`mlAdvancedDetector ${detectorIndex} > mlAdvancedDetectorEditButton`
);
await this.assertCreateDetectorModalExists();
});
},

async createJob() {
await testSubjects.clickWhenNotDisabled('mlJobWizardButtonCreateJob');
// this retry can be removed as soon as #48734 is merged
await retry.tryForTime(5000, async () => {
await testSubjects.existOrFail('mlStartDatafeedModal');
});
await testSubjects.existOrFail('mlStartDatafeedModal', { timeout: 10 * 1000 });
},
};
}

0 comments on commit 53be053

Please sign in to comment.