Skip to content

Commit

Permalink
Fixing flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
ymao1 committed May 17, 2024
1 parent 36008b0 commit d5c6ac3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide
await esTestIndexTool.setup();
});
afterEach(async () => {
objectRemover.removeAll();
await objectRemover.removeAll();
await esTestIndexTool.destroy();
});
after(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ const findTestUtils = (
supertest: SuperTestAgent,
supertestWithoutAuth: any
) => {
describe.skip(describeType, () => {
afterEach(() => objectRemover.removeAll());
describe(describeType, () => {
afterEach(async () => {
await objectRemover.removeAll();
});

for (const scenario of UserAtSpaceScenarios) {
const { user, space } = scenario;
Expand Down Expand Up @@ -651,9 +653,7 @@ export default function createFindTests({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
const supertestWithoutAuth = getService('supertestWithoutAuth');

// Failing: See https://github.com/elastic/kibana/issues/182263
// Failing: See https://github.com/elastic/kibana/issues/182284
describe.skip('find', () => {
describe('find', () => {
const objectRemover = new ObjectRemover(supertest);

afterEach(() => objectRemover.removeAll());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ const findTestUtils = (
supertest: SuperTestAgent,
supertestWithoutAuth: any
) => {
// FLAKY: https://github.com/elastic/kibana/issues/182314
describe.skip(describeType, () => {
describe(describeType, () => {
afterEach(() => objectRemover.removeAll());

for (const scenario of UserAtSpaceScenarios) {
const { user, space } = scenario;
// FLAKY: https://github.com/elastic/kibana/issues/182314
describe.skip(scenario.id, () => {
describe(scenario.id, () => {
it('should handle find alert request appropriately', async () => {
const { body: createdAlert } = await supertest
.post(`${getUrlPrefix(space.id)}/api/alerting/rule`)
Expand Down

0 comments on commit d5c6ac3

Please sign in to comment.