Skip to content

Commit b020db7

Browse files
committed
fix test for realz?
1 parent 754858e commit b020db7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- ref(astro): Adjust `mechanism` on error events captured by astro middleware ([#17613](https://github.com/getsentry/sentry-javascript/pull/17613))
1919
- ref(aws-severless): Slightly adjust aws-serverless mechanism type ([#17614](https://github.com/getsentry/sentry-javascript/pull/17614))
2020
- ref(bun): Adjust `mechanism` of errors captured in Bun.serve ([#17616](https://github.com/getsentry/sentry-javascript/pull/17616))
21+
- ref(cloudflare): Adjust event `mechanisms` and durable object origin ([#17618](https://github.com/getsentry/sentry-javascript/pull/17618))
2122
- ref(core): Adjust `mechanism` in `captureConsoleIntegration` ([#17633](https://github.com/getsentry/sentry-javascript/pull/17633))
2223
- ref(core): Adjust MCP server error event `mechanism` ([#17622](https://github.com/getsentry/sentry-javascript/pull/17622))
2324
- ref(core): Simplify `linkedErrors` mechanism logic ([#17600](https://github.com/getsentry/sentry-javascript/pull/17600))

dev-packages/e2e-tests/test-applications/cloudflare-workers/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const config = getPlaywrightConfig(
1515
{
1616
// This comes with the risk of tests leaking into each other but the tests run quite slow so we should parallelize
1717
workers: '100%',
18+
retries: 0,
1819
},
1920
);
2021

dev-packages/e2e-tests/test-applications/cloudflare-workers/tests/index.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test('Index page', async ({ baseURL }) => {
1010

1111
test("worker's withSentry", async ({ baseURL }) => {
1212
const eventWaiter = waitForError('cloudflare-workers', event => {
13-
return event.exception?.values?.[0]?.mechanism?.type === 'cloudflare';
13+
return event.exception?.values?.[0]?.mechanism?.type === 'auto.http.cloudflare';
1414
});
1515
const response = await fetch(`${baseURL}/throwException`);
1616
expect(response.status).toBe(500);
@@ -29,7 +29,6 @@ test('RPC method which throws an exception to be logged to sentry', async ({ bas
2929
});
3030

3131
test("Request processed by DurableObject's fetch is recorded", async ({ baseURL }) => {
32-
console.log('xx Request processed by DurableObject');
3332
const eventWaiter = waitForError('cloudflare-workers', event => {
3433
return event.exception?.values?.[0]?.mechanism?.type === 'auto.faas.cloudflare.durable_object';
3534
});
@@ -41,7 +40,7 @@ test("Request processed by DurableObject's fetch is recorded", async ({ baseURL
4140

4241
test('Websocket.webSocketMessage', async ({ baseURL }) => {
4342
const eventWaiter = waitForError('cloudflare-workers', event => {
44-
return event.exception?.values?.[0]?.mechanism?.type === 'auto.faas.cloudflare.durable_object_websocket';
43+
return event.exception?.values?.[0]?.mechanism?.type === 'auto.faas.cloudflare.durable_object';
4544
});
4645
const url = new URL('/pass-to-object/ws', baseURL);
4746
url.protocol = url.protocol.replace('http', 'ws');
@@ -56,7 +55,7 @@ test('Websocket.webSocketMessage', async ({ baseURL }) => {
5655

5756
test('Websocket.webSocketClose', async ({ baseURL }) => {
5857
const eventWaiter = waitForError('cloudflare-workers', event => {
59-
return event.exception?.values?.[0]?.mechanism?.type === 'auto.faas.cloudflare.durable_object_websocket';
58+
return event.exception?.values?.[0]?.mechanism?.type === 'auto.faas.cloudflare.durable_object';
6059
});
6160
const url = new URL('/pass-to-object/ws', baseURL);
6261
url.protocol = url.protocol.replace('http', 'ws');

0 commit comments

Comments
 (0)