File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed
dev-packages/cloudflare-integration-tests Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export function createRunner(...paths: string[]) {
8686 }
8787 return this ;
8888 } ,
89- start : function ( ) : StartResult {
89+ start : function ( signal ?: AbortSignal ) : StartResult {
9090 const { resolve, reject, promise : isComplete } = deferredPromise ( cleanupChildProcesses ) ;
9191 const expectedEnvelopeCount = expectedEnvelopes . length ;
9292
@@ -155,7 +155,7 @@ export function createRunner(...paths: string[]) {
155155 '--var' ,
156156 `SENTRY_DSN:http://public@localhost:${ mockServerPort } /1337` ,
157157 ] ,
158- { stdio } ,
158+ { stdio, signal } ,
159159 ) ;
160160
161161 CLEANUP_STEPS . add ( ( ) => {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { expect, it } from 'vitest';
22import { eventEnvelope } from '../../expect' ;
33import { createRunner } from '../../runner' ;
44
5- it ( 'Basic error in fetch handler' , async ( ) => {
5+ it ( 'Basic error in fetch handler' , async ( { signal } ) => {
66 const runner = createRunner ( __dirname )
77 . expect (
88 eventEnvelope ( {
@@ -26,7 +26,7 @@ it('Basic error in fetch handler', async () => {
2626 } ,
2727 } ) ,
2828 )
29- . start ( ) ;
29+ . start ( signal ) ;
3030 await runner . makeRequest ( 'get' , '/' , { expectError : true } ) ;
3131 await runner . completed ( ) ;
3232} ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { createRunner } from '../../../runner';
66// want to test that the instrumentation does not break in our
77// cloudflare SDK.
88
9- it ( 'traces a basic message creation request' , async ( ) => {
9+ it ( 'traces a basic message creation request' , async ( { signal } ) => {
1010 const runner = createRunner ( __dirname )
1111 . ignore ( 'event' )
1212 . expect ( envelope => {
@@ -35,7 +35,7 @@ it('traces a basic message creation request', async () => {
3535 ] ) ,
3636 ) ;
3737 } )
38- . start ( ) ;
38+ . start ( signal ) ;
3939 await runner . makeRequest ( 'get' , '/' ) ;
4040 await runner . completed ( ) ;
4141} ) ;
Original file line number Diff line number Diff line change 11import { expect , it } from 'vitest' ;
22import { createRunner } from '../../../runner' ;
33
4- it ( 'traces a durable object method' , async ( ) => {
4+ it ( 'traces a durable object method' , async ( { signal } ) => {
55 const runner = createRunner ( __dirname )
66 . expect ( envelope => {
77 const transactionEvent = envelope [ 1 ] ?. [ 0 ] ?. [ 1 ] ;
@@ -21,7 +21,7 @@ it('traces a durable object method', async () => {
2121 } ) ,
2222 ) ;
2323 } )
24- . start ( ) ;
24+ . start ( signal ) ;
2525 await runner . makeRequest ( 'get' , '/hello' ) ;
2626 await runner . completed ( ) ;
2727} ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { createRunner } from '../../../runner';
66// want to test that the instrumentation does not break in our
77// cloudflare SDK.
88
9- it ( 'traces a basic chat completion request' , async ( ) => {
9+ it ( 'traces a basic chat completion request' , async ( { signal } ) => {
1010 const runner = createRunner ( __dirname )
1111 . ignore ( 'event' )
1212 . expect ( envelope => {
@@ -37,7 +37,7 @@ it('traces a basic chat completion request', async () => {
3737 ] ) ,
3838 ) ;
3939 } )
40- . start ( ) ;
40+ . start ( signal ) ;
4141 await runner . makeRequest ( 'get' , '/' ) ;
4242 await runner . completed ( ) ;
4343} ) ;
You can’t perform that action at this time.
0 commit comments