Skip to content

Commit

Permalink
[8.8] [ML] Functional tests - stabilize and re-enable export jobs tes…
Browse files Browse the repository at this point in the history
…ts (#152334) (#156480)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[ML] Functional tests - stabilize and re-enable export jobs tests
(#152334)](#152334)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Robert
Oskamp","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-03T08:19:44Z","message":"[ML]
Functional tests - stabilize and re-enable export jobs tests
(#152334)\n\nThis PR re-enables the export job tests and the reporting
download tests\r\nafter the underlying issues has been fixed by
switching to the new\r\nheadless browser
mode.","sha":"a90f4c24dac8d6d23105e1a5119c36634aa27f42","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","backport:prev-minor","v8.8.0","v8.9.0"],"number":152334,"url":"https://github.com/elastic/kibana/pull/152334","mergeCommit":{"message":"[ML]
Functional tests - stabilize and re-enable export jobs tests
(#152334)\n\nThis PR re-enables the export job tests and the reporting
download tests\r\nafter the underlying issues has been fixed by
switching to the new\r\nheadless browser
mode.","sha":"a90f4c24dac8d6d23105e1a5119c36634aa27f42"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152334","number":152334,"mergeCommit":{"message":"[ML]
Functional tests - stabilize and re-enable export jobs tests
(#152334)\n\nThis PR re-enables the export job tests and the reporting
download tests\r\nafter the underlying issues has been fixed by
switching to the new\r\nheadless browser
mode.","sha":"a90f4c24dac8d6d23105e1a5119c36634aa27f42"}}]}] BACKPORT-->

Co-authored-by: Robert Oskamp <[email protected]>
  • Loading branch information
kibanamachine and pheyos authored May 3, 2023
1 parent ef230e5 commit 3e9f8c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await testSubjects.existOrFail('csvDownloadStarted'); // validate toast panel
};

// Failing: See https://github.com/elastic/kibana/issues/150561
// Failing: See https://github.com/elastic/kibana/issues/150562
// Failing: See https://github.com/elastic/kibana/issues/148314
// Failing: See https://github.com/elastic/kibana/issues/150563
// Failing: See https://github.com/elastic/kibana/issues/150561
describe.skip('Download CSV', () => {
describe('Download CSV', () => {
before('initialize tests', async () => {
log.debug('ReportingPage:initTests');
await browser.setWindowSize(1600, 850);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const ml = getService('ml');

// Failing: See https://github.com/elastic/kibana/issues/150557
describe.skip('export jobs', function () {
describe('export jobs', function () {
this.tags(['ml']);

before(async () => {
await ml.api.cleanMlIndices();
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote');
Expand Down Expand Up @@ -282,6 +282,7 @@ export default function ({ getService }: FtrProviderContext) {
await ml.navigation.navigateToStackManagement();
await ml.navigation.navigateToStackManagementJobsListPage();
});

after(async () => {
await ml.api.cleanMlIndices();
ml.stackManagementJobs.deleteExportedFiles([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export function MachineLearningStackManagementJobsProvider({

async getDownload(filePath: string) {
return retry.tryForTime(5000, async () => {
expect(fs.existsSync(filePath)).to.be(true);
expect(fs.existsSync(filePath)).to.eql(true, `File path ${filePath} should exist`);
return fs.readFileSync(filePath).toString();
});
},
Expand Down

0 comments on commit 3e9f8c7

Please sign in to comment.