Skip to content

Commit 0420ffd

Browse files
committed
[ML] Functional tests - stabilize DFA job type check (#74631)
This PR stabilizes the data frame analytics job type assertion by adding a retry.
1 parent 3371621 commit 0420ffd

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

x-pack/test/functional/services/ml/data_frame_analytics_creation.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,16 @@ export function MachineLearningDataFrameAnalyticsCreationProvider(
4646
},
4747

4848
async assertJobTypeSelection(expectedSelection: string) {
49-
const actualSelection = await testSubjects.getAttribute(
50-
'mlAnalyticsCreateJobWizardJobTypeSelect',
51-
'value'
52-
);
53-
expect(actualSelection).to.eql(
54-
expectedSelection,
55-
`Job type selection should be '${expectedSelection}' (got '${actualSelection}')`
56-
);
49+
await retry.tryForTime(5000, async () => {
50+
const actualSelection = await testSubjects.getAttribute(
51+
'mlAnalyticsCreateJobWizardJobTypeSelect',
52+
'value'
53+
);
54+
expect(actualSelection).to.eql(
55+
expectedSelection,
56+
`Job type selection should be '${expectedSelection}' (got '${actualSelection}')`
57+
);
58+
});
5759
},
5860

5961
async selectJobType(jobType: string) {

0 commit comments

Comments
 (0)