|
9 | 9 | const { withVersions } = require('../../../dd-trace/test/setup/mocha') |
10 | 10 | const { assert, expect } = require('chai') |
11 | 11 |
|
| 12 | +const spawnEnv = { DD_TRACE_FLUSH_INTERVAL: '2000' } |
| 13 | + |
12 | 14 | describe('esm', () => { |
13 | 15 | let agent |
14 | 16 | let proc |
@@ -42,7 +44,7 @@ describe('esm', () => { |
42 | 44 | assert.strictEqual(checkSpansForServiceName(payload, 'azure.eventhubs.send'), true) |
43 | 45 | }) |
44 | 46 |
|
45 | | - proc = await spawnPluginIntegrationTestProc(sandbox.folder, 'server.mjs', agent.port) |
| 47 | + proc = await spawnPluginIntegrationTestProc(sandbox.folder, 'server.mjs', agent.port, spawnEnv) |
46 | 48 | await res |
47 | 49 | }).timeout(20000) |
48 | 50 |
|
@@ -86,15 +88,15 @@ describe('esm', () => { |
86 | 88 | assert.strictEqual(parseLinks(payload[4][0]).length, 2) |
87 | 89 | }) |
88 | 90 |
|
89 | | - proc = await spawnPluginIntegrationTestProc(sandbox.folder, 'server.mjs', agent.port) |
| 91 | + proc = await spawnPluginIntegrationTestProc(sandbox.folder, 'server.mjs', agent.port, spawnEnv) |
90 | 92 | await res |
91 | 93 | }).timeout(60000) |
92 | 94 |
|
93 | 95 | it('does not add span links when they are disabled', async () => { |
94 | 96 | const res = agent.assertMessageReceived(({ headers, payload }) => { |
95 | 97 | expect(payload[2][0]).to.not.have.property('_dd.span_links') |
96 | 98 | }) |
97 | | - const envVar = { DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED: false } |
| 99 | + const envVar = { DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED: false, ...spawnEnv } |
98 | 100 | proc = await spawnPluginIntegrationTestProc(sandbox.folder, 'server.mjs', agent.port, undefined, envVar) |
99 | 101 | await res |
100 | 102 | }).timeout(60000) |
|
0 commit comments