Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions dev-packages/cloudflare-integration-tests/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,14 @@ export function createRunner(...paths: string[]) {

let envelopeCount = 0;
const envelopeWaiters: { expected: Expected; resolve: () => void; reject: (e: unknown) => void }[] = [];
const { resolve: setWorkerPort, promise: workerPortPromise } = deferredPromise<number>();
const {
resolve: setWorkerPort,
reject: rejectWorkerPort,
promise: workerPortPromise,
} = deferredPromise<number>();
workerPortPromise.catch(() => {
// handled in `makeRequest`
});
let child: ReturnType<typeof spawn> | undefined;
let childSubWorker: ReturnType<typeof spawn> | undefined;

Expand Down Expand Up @@ -277,6 +284,10 @@ export function createRunner(...paths: string[]) {
resolve(parseInt(new URL(match[1]).port, 10));
}
});

childProcess.on('close', (code, sig) => {
reject(new Error(`wrangler exited with code ${code} (signal ${sig}) before becoming ready`));
});
Comment thread
JPeer264 marked this conversation as resolved.
});
}

Expand Down Expand Up @@ -340,7 +351,10 @@ export function createRunner(...paths: string[]) {

setWorkerPort(workerPort);
})
.catch(e => reject(e));
.catch(e => {
rejectWorkerPort(e);
reject(e);
});

return {
completed: async function (): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { createRunner } from '../../../runner';
// must appear as children of the DO transaction. The first invocation always worked;
// the second invocation on the same DO instance previously lost its child spans
// because the client was disposed after the first call.
// TODO: unskip - this test is flaky, timing out in CI
it.skip('sends child spans on repeated Durable Object calls', async ({ signal }) => {
it('sends child spans on repeated Durable Object calls', async ({ signal }) => {
function assertDoWorkEnvelope(envelope: unknown): void {
const transactionEvent = (envelope as any)[1]?.[0]?.[1];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ it('handles consecutive RPC calls without throwing "RPC receiver does not implem
// the Proxy must ensure `this` refers to the original object (not the Proxy),
// otherwise private field access throws: "Cannot read private member from an object
// whose class did not declare it"
// TODO: unskip - this test is flaky, timing out in CI (#21201)
it.skip('allows RPC methods to access private class fields', async ({ signal }) => {
it('allows RPC methods to access private class fields', async ({ signal }) => {
const runner = createRunner(__dirname)
.expect(envelope => {
const transactionEvent = envelope[1]?.[0]?.[1] as Event;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({
},
isolate: false,
include: ['./suites/**/test.ts'],
testTimeout: 20_000,
testTimeout: 30_000,
// Ensure we can see debug output when DEBUG=true
...(process.env.DEBUG
? {
Expand Down
Loading