Skip to content

Commit

Permalink
Remove debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Oct 30, 2024
1 parent ab52cb6 commit 8a80152
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { TEST_CACHE_EXPIRATION_TIME } from '../../create_test_data';
// eslint-disable-next-line import/no-default-export
export default function createAlertsAsDataFlappingTest({ getService }: FtrProviderContext) {
const es = getService('es');
const log = getService('log');
const retry = getService('retry');
const supertest = getService('supertest');
const supertestWithoutAuth = getService('supertestWithoutAuth');
Expand Down Expand Up @@ -732,24 +731,14 @@ export default function createAlertsAsDataFlappingTest({ getService }: FtrProvid
expect(response.status).to.eql(204);
});

const eventLogs = await waitForEventLogDocs(
ruleId,
new Map([['execute', { equal: ++run }]])
);
await waitForEventLogDocs(ruleId, new Map([['execute', { equal: ++run }]]));

const alertDocs = await queryForAlertDocs<PatternFiringAlert>(ruleId);
const isFlapping = alertDocs[0]._source![ALERT_FLAPPING];

log.debug(`Alert docs for run=${run}: ${JSON.stringify(alertDocs)}`);
log.debug(`Event log docs for run=${run}: ${JSON.stringify(eventLogs)}`);

if (!runWhichItFlapped && isFlapping) {
runWhichItFlapped = run;
}

log.debug(
`runWhichItFlapped for run=${run}, isFlapping=${isFlapping}: ${runWhichItFlapped}`
);
}

// Never flapped, since globl flapping is off
Expand Down

0 comments on commit 8a80152

Please sign in to comment.