elastic / elastic/apm-agent-nodejs

spurious "Error.prepareStackTrace is set" test failure in GH Actions CI

Open
#3,140 1 comment 0 reactions 0 assignees View on GitHub
agent-nodejs flaky-test
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

I've seen this one a few times:

```running test: cd . && node --unhandled-rejections=strict test/stacktraces/stacktraces.test.js > test_output/test-stacktraces-stacktraces.test.js.tap 2&>1
...

# Error.prepareStackTrace is set
not ok 44 should be truthy
---
operator: ok
expected: true
actual: false
at: done (/home/runner/work/apm-agent-nodejs/apm-agent-nodejs/test/stacktraces/stacktraces.test.js:416:13)
stack: |-
Error: should be truthy
at Test.assert [as _assert] (/home/runner/work/apm-agent-nodejs/apm-agent-nodejs/node_modules/tape/lib/test.js:312:48)
at Test.bound [as _assert] (/home/runner/work/apm-agent-nodejs/apm-agent-nodejs/node_modules/tape/lib/test.js:95:17)
at Test.assert (/home/runner/work/apm-agent-nodejs/apm-agent-nodejs/node_modules/tape/lib/test.js:431:7)
at Test.bound [as ok] (/home/runner/work/apm-agent-nodejs/apm-agent-nodejs/node_modules/tape/lib/test.js:95:17)
at done (/home/runner/work/apm-agent-nodejs/apm-agent-nodejs/test/stacktraces/stacktraces.test.js:416:13)
at ChildProcess.exithandler (node:child_process:410:5)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
...
ok 45 Error.prepareStackTrace is set
# Error.prepareStackTrace is not set
ok 46 should be truthy
ok 47 Error.prepareStackTrace is set
...
```

Examples:
- https://github.com/elastic/apm-agent-nodejs/actions/runs/4078804930/jobs/7029455271 (2023-02-02)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.