Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-fernandez committed Feb 14, 2024
1 parent ee1a5c4 commit 6aa2000
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
13 changes: 2 additions & 11 deletions integration-tests/ci-visibility-intake.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,14 @@ class FakeCiVisIntake extends FakeAgent {

// It can be slowed down with setWaitingTime
app.post(['/api/v2/citestcycle', '/evp_proxy/:version/api/v2/citestcycle'], (req, res) => {
if (waitingTime) {
this.waitingTimeoutId = setTimeout(() => {
res.status(200).send('OK')
this.emit('message', {
headers: req.headers,
payload: msgpack.decode(req.body, { codec }),
url: req.url
})
}, waitingTime)
} else {
this.waitingTimeoutId = setTimeout(() => {
res.status(200).send('OK')
this.emit('message', {
headers: req.headers,
payload: msgpack.decode(req.body, { codec }),
url: req.url
})
}
}, waitingTime || 0)
})

app.post([
Expand Down
1 change: 1 addition & 0 deletions packages/datadog-instrumentations/src/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ function cliWrapper (cli, jestVersion) {
}
let timeoutId

// Pass the resolve callback to defer it to DC listener
const flushPromise = new Promise((resolve) => {
onDone = () => {
clearTimeout(timeoutId)
Expand Down

0 comments on commit 6aa2000

Please sign in to comment.