Skip to content

Commit

Permalink
[logstash/pipelineCreate] retry reading rows (#32436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer authored Mar 5, 2019
1 parent 59afd0c commit 3c30ed8
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions x-pack/test/functional/apps/logstash/pipeline_create.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function ({ getService, getPageObjects }) {
const pipelineList = getService('pipelineList');
const pipelineEditor = getService('pipelineEditor');
const PageObjects = getPageObjects(['logstash']);
const retry = getService('retry');

describe('pipeline create new', () => {
let originalWindowSize;
Expand Down Expand Up @@ -67,11 +68,13 @@ export default function ({ getService, getPageObjects }) {
await pipelineList.assertExists();
await pipelineList.setFilter(id);

const rows = await pipelineList.readRows();
const newRow = rows.find(row => row.id === id);
await retry.try(async () => {
const rows = await pipelineList.readRows();
const newRow = rows.find(row => row.id === id);

expect(newRow)
.to.have.property('description', description);
expect(newRow)
.to.have.property('description', description);
});
});
});

Expand All @@ -84,9 +87,11 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.logstash.gotoNewPipelineEditor();
await pipelineEditor.clickCancel();

await pipelineList.assertExists();
const currentRows = await pipelineList.readRows();
expect(originalRows).to.eql(currentRows);
await retry.try(async () => {
await pipelineList.assertExists();
const currentRows = await pipelineList.readRows();
expect(originalRows).to.eql(currentRows);
});
});
});

Expand Down

0 comments on commit 3c30ed8

Please sign in to comment.