[esArchiver] refresh all, stop being too clever (#35186)
* [esArchiver] refresh all, stop being too clever * wait for save notification before ending tests I have a hunch that Timelion/Kibana are still mucking with the .kibana index when the test ends, and the `esArchiver.unload()` call is conflicting because of those modifications being still in progress.
This commit is contained in:
parent
c0edcbe9ab
commit
27bd635397
|
@ -74,16 +74,15 @@ export async function loadAction({ name, skipExisting, client, dataDir, log, kib
|
|||
|
||||
const result = stats.toJSON();
|
||||
|
||||
const indicesToRefresh = Object
|
||||
.entries(result)
|
||||
.filter(([, stats]) => !stats.deleted)
|
||||
.map(([index, { docs }]) => {
|
||||
for (const [index, { docs }] of Object.entries(result)) {
|
||||
if (!docs && docs.indexed > 0) {
|
||||
log.info('[%s] Indexed %d docs into %j', name, docs.indexed, index);
|
||||
return index;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
await client.indices.refresh({
|
||||
index: indicesToRefresh
|
||||
index: '_all',
|
||||
allowNoIndices: true,
|
||||
});
|
||||
|
||||
// If we affected the Kibana index, we need to ensure it's migrated...
|
||||
|
|
|
@ -379,12 +379,13 @@ app.controller('timelion', function (
|
|||
savedSheet.timelion_rows = $scope.state.rows;
|
||||
savedSheet.save().then(function (id) {
|
||||
if (id) {
|
||||
toastNotifications.addSuccess(
|
||||
i18n('timelion.saveSheet.successNotificationText', {
|
||||
toastNotifications.addSuccess({
|
||||
title: i18n('timelion.saveSheet.successNotificationText', {
|
||||
defaultMessage: `Saved sheet '{title}'`,
|
||||
values: { title: savedSheet.title },
|
||||
})
|
||||
);
|
||||
}),
|
||||
'data-test-subj': 'timelionSaveSuccessToast',
|
||||
});
|
||||
|
||||
if (savedSheet.id !== $routeParams.id) {
|
||||
kbnUrl.change('/{{id}}', { id: savedSheet.id });
|
||||
|
|
|
@ -73,6 +73,8 @@ export function TimelionPageProvider({ getService, getPageObjects }) {
|
|||
await testSubjects.click('timelionSaveButton');
|
||||
await testSubjects.click('timelionSaveAsSheetButton');
|
||||
await testSubjects.click('timelionFinishSaveButton');
|
||||
await testSubjects.existOrFail('timelionSaveSuccessToast');
|
||||
await testSubjects.waitForDeleted('timelionSaveSuccessToast');
|
||||
}
|
||||
|
||||
async expectWriteControls() {
|
||||
|
|
Loading…
Reference in a new issue