[ResponseOps][Cases] Fix duplicate alerts test (#141445)

* Trying fix

* Removing flaky test only
This commit is contained in:
Jonathan Buttner 2022-09-22 12:12:11 -04:00 committed by GitHub
parent d8f83051d5
commit d868f2c12c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,8 +55,7 @@ export default ({ getService }: FtrProviderContext): void => {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
// Failing: See https://github.com/elastic/kibana/issues/139626
describe.skip('find_cases', () => {
describe('find_cases', () => {
describe('basic tests', () => {
afterEach(async () => {
await deleteAllCaseItems(es);
@ -369,6 +368,11 @@ export default ({ getService }: FtrProviderContext): void => {
owner: 'securitySolutionFixture',
},
});
// There is potential for the alert index to not be refreshed by the time the second comment is created
// which could attempt to update the alert status again and will encounter a conflict so this will
// ensure that the index is up to date before we try to update the next alert status
await es.indices.refresh({ index: defaultSignalsIndex });
}
const patchedCase = await createComment({