Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
bengl committed Jun 17, 2024
1 parent 95948d8 commit 7b20ebf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions integration-tests/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,14 @@ function telemetryForwarder (expectedTelemetryPoints) {
}
msgs = msgs.map(msg => {
const [telemetryType, data] = msg.split('\t')
let parsed
try {
parsed = JSON.parse(data)

Check failure on line 360 in integration-tests/helpers.js

View workflow job for this annotation

GitHub Actions / lint

'parsed' is assigned a value but never used
} catch (e) {
console.log(msg)

Check failure on line 362 in integration-tests/helpers.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
console.log(data)

Check failure on line 363 in integration-tests/helpers.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
throw new SyntaxError(`error parsing data: ${e.message}\n${data}`)
}
return [telemetryType, JSON.parse(data)]
})
await fs.unlink(process.env.FORWARDER_OUT)
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/init.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ true
})
}

describe('init.js', () => {
describe.only('init.js', () => {

Check warning on line 127 in integration-tests/init.spec.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected exclusive mocha test
useSandbox()

testInjectionScenarios('require', 'init.js', false)
Expand Down
3 changes: 2 additions & 1 deletion packages/dd-trace/src/telemetry/init-telemetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ function sendTelemetry (name, tags = []) {
stdio: 'pipe',
shell: true
})
proc.stdin.end(JSON.stringify({ metadata, points }))
const bytes = JSON.stringify({ metadata, points })
proc.stdin.end(bytes)
}

0 comments on commit 7b20ebf

Please sign in to comment.