Skip to content

Commit

Permalink
Hacking around test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
matschaffer committed May 31, 2022
1 parent 5a8bc3b commit 08b66fb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/alerting/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

module.exports = {
preset: '@kbn/test',
preset: '@kbn/test/jest_node',
rootDir: '../../..',
roots: ['<rootDir>/x-pack/plugins/alerting'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/x-pack/plugins/alerting',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import { InMemoryMetrics, IN_MEMORY_METRICS } from '.';
import { loggingSystemMock } from '@kbn/core/server/mocks';

jest.useFakeTimers();

describe('inMemoryMetrics', () => {
const logger = loggingSystemMock.createLogger();
const inMemoryMetrics = new InMemoryMetrics(logger);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class InMemoryMetrics {
constructor(logger: Logger) {
this.logger = logger;

this.logger.debug('MATSCHAFFER: CREATING meter provider');
// this.logger.debug('MATSCHAFFER: CREATING meter provider');
const provider = new MeterProvider({
exporter: new OTLPMetricExporter(),
interval: 1000,
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/alerting/server/task_runner/task_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ export class TaskRunner<
};

if (!this.cancelled) {
this.logger.debug("MATSCHAFFER: INCREMENTING rule's execution count");
// this.logger.debug("MATSCHAFFER: INCREMENTING rule's execution count");
// this.inMemoryMetrics.increment(IN_MEMORY_METRICS.RULE_EXECUTIONS, { rule: this.ruleType.id });
this.inMemoryMetrics.increment(IN_MEMORY_METRICS.RULE_EXECUTIONS);
if (executionStatus.error) {
Expand Down

0 comments on commit 08b66fb

Please sign in to comment.