Skip to content

Commit 64e9fb6

Browse files
authored
test(node): Ensure client reports do not make tests flaky (#15005)
They are now ignored by default, unless we specifically want to test them. Noticed e.g. here https://github.com/getsentry/sentry-javascript/actions/runs/12767810178/job/35587298600?pr=14999 that this can be flaky now.
1 parent f24ee28 commit 64e9fb6

File tree

5 files changed

+4
-2
lines changed

5 files changed

+4
-2
lines changed

dev-packages/node-integration-tests/suites/client-reports/drop-reasons/before-send/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ afterAll(() => {
66

77
test('should record client report for beforeSend', done => {
88
createRunner(__dirname, 'scenario.ts')
9+
.unignore('client_report')
910
.expect({
1011
client_report: {
1112
discarded_events: [

dev-packages/node-integration-tests/suites/client-reports/drop-reasons/event-processors/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ afterAll(() => {
66

77
test('should record client report for event processors', done => {
88
createRunner(__dirname, 'scenario.ts')
9+
.unignore('client_report')
910
.expect({
1011
client_report: {
1112
discarded_events: [

dev-packages/node-integration-tests/suites/client-reports/periodic-send/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ afterAll(() => {
66

77
test('should flush client reports automatically after the timeout interval', done => {
88
createRunner(__dirname, 'scenario.ts')
9+
.unignore('client_report')
910
.expect({
1011
client_report: {
1112
discarded_events: [

dev-packages/node-integration-tests/suites/tracing/requests/http-unsampled/test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ test('outgoing http requests are correctly instrumented when not sampled', done
2727
.then(([SERVER_URL, closeTestServer]) => {
2828
createRunner(__dirname, 'scenario.ts')
2929
.withEnv({ SERVER_URL })
30-
.ignore('client_report')
3130
.expect({
3231
event: {
3332
exception: {

dev-packages/node-integration-tests/utils/runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export function createRunner(...paths: string[]) {
152152
let expectedEnvelopeHeaders: ExpectedEnvelopeHeader[] | undefined = undefined;
153153
const flags: string[] = [];
154154
// By default, we ignore session & sessions
155-
const ignored: Set<EnvelopeItemType> = new Set(['session', 'sessions']);
155+
const ignored: Set<EnvelopeItemType> = new Set(['session', 'sessions', 'client_report']);
156156
let withEnv: Record<string, string> = {};
157157
let withSentryServer = false;
158158
let dockerOptions: DockerOptions | undefined;

0 commit comments

Comments
 (0)