Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aryamohanan committed Oct 7, 2024
1 parent dec3388 commit 8e99db6
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/collector/test/tracing/database/db2/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
const dns = require('dns').promises;
const path = require('path');
const expect = require('chai').expect;
const semver = require('semver');

const { supportedVersion, constants } = require('@instana/core').tracing;
const testUtils = require('../../../../../core/test/test_util');
Expand Down Expand Up @@ -790,11 +789,7 @@ mochaSuiteFn('tracing/db2', function () {
});

it('[with fetch and error] must trace prepare execute mixed 1', function () {
let expectedError = 'TypeError: Cannot read properties of null (reading';
if (semver.lt(process.versions.node, '16.0.0')) {
// For Node.js 14 and earlier, the error message is slightly different.
expectedError = "TypeError: Cannot read property 'fetchMode' of null";
}
const expectedError = 'TypeError: Cannot read properties of null (reading';

return controls
.sendRequest({
Expand Down Expand Up @@ -882,10 +877,10 @@ mochaSuiteFn('tracing/db2', function () {
.then(() =>
testUtils.retry(() =>
verifySpans(agentControls, controls, {
numberOfSpans: 14,
numberOfSpans: 15,
// Spans:
// 10 queries splitted from the file
// 4 fs operations on top (ours + from db2 internally fs-extra)
// 5 fs operations on top (ours + from db2 internally fs-extra)
// https://github.com/ibmdb/node-ibm_db/blob/fb25937524d74d25917e9aa67fb4737971317986/lib/odbc.js#L916
// If the Otel integration is disabled, we expect 11 spans.
verifyCustom: (entrySpan, spans) => {
Expand Down

0 comments on commit 8e99db6

Please sign in to comment.