Skip to content

Commit

Permalink
[ML] Functional tests - stabilize DFA navigation and index pattern ha…
Browse files Browse the repository at this point in the history
…ndling (#73660) (#73679)

This PR adds a few stability fixes around DFA creation and cloning.
  • Loading branch information
pheyos authored Jul 30, 2020
1 parent 3621611 commit 51f6fdf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export default function ({ getService }: FtrProviderContext) {
await ml.api.deleteIndices(cloneDestIndex);
await ml.api.deleteIndices(testData.job.dest!.index as string);
await ml.testResources.deleteIndexPatternByTitle(testData.job.dest!.index as string);
await ml.testResources.deleteIndexPatternByTitle(cloneDestIndex);
});

it('should open the wizard with a proper header', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,24 @@ export function MachineLearningDataFrameAnalyticsCreationProvider(
},

async continueToAdditionalOptionsStep() {
await testSubjects.clickWhenNotDisabled('mlAnalyticsCreateJobWizardContinueButton');
await this.assertAdditionalOptionsStepActive();
await retry.tryForTime(5000, async () => {
await testSubjects.clickWhenNotDisabled('mlAnalyticsCreateJobWizardContinueButton');
await this.assertAdditionalOptionsStepActive();
});
},

async continueToDetailsStep() {
await testSubjects.clickWhenNotDisabled('mlAnalyticsCreateJobWizardContinueButton');
await this.assertDetailsStepActive();
await retry.tryForTime(5000, async () => {
await testSubjects.clickWhenNotDisabled('mlAnalyticsCreateJobWizardContinueButton');
await this.assertDetailsStepActive();
});
},

async continueToCreateStep() {
await testSubjects.clickWhenNotDisabled('mlAnalyticsCreateJobWizardContinueButton');
await this.assertCreateStepActive();
await retry.tryForTime(5000, async () => {
await testSubjects.clickWhenNotDisabled('mlAnalyticsCreateJobWizardContinueButton');
await this.assertCreateStepActive();
});
},

async assertModelMemoryInputExists() {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/functional/services/ml/test_resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function MachineLearningTestResourcesProvider({ getService }: FtrProvider
): Promise<string | undefined> {
log.debug(`Searching for '${objectType}' with title '${title}'...`);
const findResponse = await supertest
.get(`/api/saved_objects/_find?type=${objectType}`)
.get(`/api/saved_objects/_find?type=${objectType}&per_page=10000`)
.set(COMMON_REQUEST_HEADERS)
.expect(200)
.then((res: any) => res.body);
Expand Down

0 comments on commit 51f6fdf

Please sign in to comment.