Skip to content

Commit 013c461

Browse files
committed
test(node): Fix flaky tedious test
1 parent e9d2295 commit 013c461

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

dev-packages/node-integration-tests/suites/tracing/tedious/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
restart: always
77
container_name: integration-tests-tedious
88
ports:
9-
- '1433:1433'
9+
- '1338:1338'
1010
environment:
1111
ACCEPT_EULA: 'Y'
1212
MSSQL_SA_PASSWORD: 'TESTing123'

dev-packages/node-integration-tests/suites/tracing/tedious/scenario.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Sentry.init({
1010

1111
const { Connection, Request } = require('tedious');
1212

13-
const config = {
13+
const connection = new Connection({
1414
server: '127.0.0.1',
1515
authentication: {
1616
type: 'default',
@@ -20,12 +20,10 @@ const config = {
2020
},
2121
},
2222
options: {
23-
port: 1433,
23+
port: 1338,
2424
encrypt: false,
2525
},
26-
};
27-
28-
const connection = new Connection(config);
26+
});
2927

3028
function executeAllStatements(span) {
3129
executeStatement('SELECT 1 + 1 AS solution', () => {

dev-packages/node-integration-tests/suites/tracing/tedious/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { afterAll, describe, expect, test } from 'vitest';
22
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';
33

4-
describe('tedious auto instrumentation', {timeout: 75_000}, () => {
4+
describe('tedious auto instrumentation', { timeout: 75_000 }, () => {
55
afterAll(() => {
66
cleanupChildProcesses();
77
});
@@ -20,7 +20,7 @@ describe('tedious auto instrumentation', {timeout: 75_000}, () => {
2020
'db.system': 'mssql',
2121
'db.user': 'sa',
2222
'net.peer.name': '127.0.0.1',
23-
'net.peer.port': 1433,
23+
'net.peer.port': 1338,
2424
}),
2525
status: 'ok',
2626
}),
@@ -34,15 +34,15 @@ describe('tedious auto instrumentation', {timeout: 75_000}, () => {
3434
'db.system': 'mssql',
3535
'db.user': 'sa',
3636
'net.peer.name': '127.0.0.1',
37-
'net.peer.port': 1433,
37+
'net.peer.port': 1338,
3838
}),
3939
status: 'ok',
4040
}),
4141
]),
4242
};
4343

4444
await createRunner(__dirname, 'scenario.js')
45-
.withDockerCompose({ workingDirectory: [__dirname], readyMatches: ['1433'] })
45+
.withDockerCompose({ workingDirectory: [__dirname], readyMatches: ['1338'] })
4646
.expect({ transaction: EXPECTED_TRANSACTION })
4747
.start()
4848
.completed();

0 commit comments

Comments
 (0)