diff --git a/packages/collector/test/tracing/logger/bunyan/app.js b/packages/collector/test/tracing/logger/bunyan/app.js index 3a18371f6..6598d6214 100644 --- a/packages/collector/test/tracing/logger/bunyan/app.js +++ b/packages/collector/test/tracing/logger/bunyan/app.js @@ -13,17 +13,7 @@ process.on('SIGTERM', () => { process.exit(0); }); -const agentPort = process.env.AGENT_PORT; - -const instana = require('../../../..'); -instana({ - agentPort, - level: 'warn', - tracing: { - enabled: process.env.TRACING_ENABLED !== 'false', - forceTransmissionStartingAt: 1 - } -}); +require('../../../..')(); const fetch = require('node-fetch-v2'); const bodyParser = require('body-parser'); @@ -35,6 +25,8 @@ const path = require('path'); const bunyan = require('bunyan'); const logger = bunyan.createLogger({ name: 'test-logger' }); +const agentPort = process.env.INSTANA_AGENT_PORT; + const app = express(); const logPrefix = `Bunyan (${process.pid}):\t`; diff --git a/packages/collector/test/tracing/logger/bunyan/test.js b/packages/collector/test/tracing/logger/bunyan/test.js index 548a7d87d..563cff52f 100644 --- a/packages/collector/test/tracing/logger/bunyan/test.js +++ b/packages/collector/test/tracing/logger/bunyan/test.js @@ -14,8 +14,7 @@ const testUtils = require('../../../../../core/test/test_util'); const globalAgent = require('../../../globalAgent'); const ProcessControls = require('../../../test_util/ProcessControls'); -// Skip for now. correct it later -const mochaSuiteFn = supportedVersion(process.versions.node) ? describe.skip : describe.skip; +const mochaSuiteFn = supportedVersion(process.versions.node) ? describe : describe.skip; mochaSuiteFn('tracing/logger/bunyan', function () { this.timeout(config.getTestTimeout()); @@ -74,7 +73,7 @@ mochaSuiteFn('tracing/logger/bunyan', function () { runTest('error-object-only', true, 'This is an error.', controls)); it("must capture a nested error object's message", async () => { - await runTest('nested-error-object-only', true, 'This is a nested error.'); + await runTest('nested-error-object-only', true, 'This is a nested error.', controls); }); it('must serialize random object', () => runTest('error-random-object-only', true, '{"foo":"[Object]"}', controls));