Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dgieselaar committed Feb 4, 2021
1 parent 5226087 commit 180a813
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/instrumentation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ test('bind', function (t) {
})
})

test('nested spans', function (t) {
test.only('nested spans', function (t) {
resetAgent(6, function (data) {
t.strictEqual(data.transactions.length, 1)
t.strictEqual(data.spans.length, 5)
Expand All @@ -620,7 +620,7 @@ test('nested spans', function (t) {
t.strictEqual(s1.transaction_id, trans.id, 's1 transaction_id matches transaction id')

const s01 = findObjInArray(data.spans, 'name', 's01')
t.strictEqual(s01.parent_id, s0.id, 's01 should descend from s0')
t.strictEqual(s01.parent_id, trans.id, 's01 should descend from the transaction')
t.strictEqual(s01.trace_id, trans.trace_id, 's01 has same trace_id as transaction')
t.strictEqual(s01.transaction_id, trans.id, 's01 transaction_id matches transaction id')

Expand Down Expand Up @@ -650,6 +650,8 @@ test('nested spans', function (t) {
var s0 = ins.startSpan('s0')
process.nextTick(function () {
process.nextTick(function () {
// will adopt the transaction as its parent,
// because s0 ended before the new span started
var s01 = ins.startSpan('s01')
process.nextTick(function () {
s01.end()
Expand Down

0 comments on commit 180a813

Please sign in to comment.