Skip to content

Commit c9e5dd8

Browse files
committed
[DI] Improve integration test failue output (#5611)
If for some reason the Dynamic Instrumentation integration tests fail in the `beforeEach` stage, there's a risk that some of the data structures that the `afterEach` block depends on have not been populated. To not spam the logs with these errors that are only present because of previous errors, better use optional chaining when referencing these data structures.
1 parent 2225d59 commit c9e5dd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

integration-tests/debugger/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ function setup ({ env, testApp, testAppSource } = {}) {
109109
})
110110

111111
afterEach(async function () {
112-
t.proc.kill()
113-
await t.agent.stop()
112+
t.proc?.kill()
113+
await t.agent?.stop()
114114
})
115115

116116
return t

0 commit comments

Comments
 (0)