[Maps] fix flaky checking for layer removed in functional tests (#36123) (#36242)

* [Maps] fix flaky checking for layer removed in functional tests

* run x-pack-ciGroup3 40 times to test for flakiness

* use retry.waitFor instead of retry.try

* Revert "run x-pack-ciGroup3 40 times to test for flakiness"

This reverts commit 9136b7717c.
This commit is contained in:
Nathan Reese 2019-05-07 18:05:06 -06:00 committed by GitHub
parent 515d6836aa
commit 136030de94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,8 +95,9 @@ export function GisPageProvider({ getService, getPageObjects }) {
async waitForLayerDeleted(layerName) {
log.debug('Wait for layer deleted');
await retry.try(async () => {
await !this.doesLayerExist(layerName);
await retry.waitFor('Layer to be deleted', async () => {
const doesLayerExist = await this.doesLayerExist(layerName);
return !doesLayerExist;
});
}
@ -337,6 +338,7 @@ export function GisPageProvider({ getService, getPageObjects }) {
log.debug(`Remove layer ${layerName}`);
await this.openLayerPanel(layerName);
await testSubjects.click(`mapRemoveLayerButton`);
await this.waitForLayerDeleted(layerName);
}
async getLayerErrorText(layerName) {