Skip to content

Commit 5732850

Browse files
committed
theory is that stdout.includes("name: 'GET'") breaks because ANSI color codes with node 18
1 parent 40ef62e commit 5732850

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

metapackages/auto-instrumentations-node/test/register.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,27 @@ import { spawnSync } from 'child_process';
1818
import * as assert from 'assert';
1919

2020
describe('Register', function () {
21-
this.timeout(5000);
2221
it('can load auto instrumentation from command line', async () => {
22+
console.log('XXX env.TERM=%s', process.env.TERM)
2323
const proc = spawnSync(
2424
process.execPath,
2525
['--require', '../build/src/register.js', './test-app/app.js'],
2626
{
2727
cwd: __dirname,
2828
timeout: 5000,
29+
killSignal: 'SIGKILL', // SIGTERM is not sufficient to terminate some hangs
2930
env: Object.assign(
3031
{},
3132
process.env,
3233
{
3334
OTEL_NODE_RESOURCE_DETECTORS: 'none',
3435
OTEL_TRACES_EXPORTER: 'console',
36+
NODE_DISABLE_COLORS: '1'
3537
}
3638
)
3739
}
3840
);
39-
console.log('XXX proc: status=%s stdout=--\n%s\n-- stderr=--\n%s\n--', proc.status, proc.stdout, proc.stderr);
41+
console.log('XXX proc: status=%s signal=%s stdout=--\n%s\n-- stderr=--\n%s\n--', proc.status, proc.signal, proc.stdout, proc.stderr);
4042
assert.ifError(proc.error);
4143
assert.ok(
4244
proc.stdout.includes(

0 commit comments

Comments
 (0)