Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan authored Oct 4, 2023
1 parent 884399e commit 0d1bc40
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -530,15 +530,15 @@ describe('BatchSpanProcessorBase', () => {
assert.equal(callbacks.length, 1)
assert.equal(spans.length, 5)
callbacks[0]({ code: ExportResultCode.SUCCESS })
await new Promise(resolve => process.nextTick(resolve))
await new Promise(resolve => setImmediate(resolve))
// After the first batch completes we will have dropped a number
// of spans and the next batch will be smaller
assert.equal(callbacks.length, 2)
assert.equal(spans.length, 10)
callbacks[1]({ code: ExportResultCode.SUCCESS })

// We expect that all the other spans have been dropped
await new Promise(resolve => process.nextTick(resolve))
await new Promise(resolve => setImmediate(resolve))
assert.equal(callbacks.length, 2)
assert.equal(spans.length, 10)
})
Expand Down

0 comments on commit 0d1bc40

Please sign in to comment.