diff --git a/packages/ws-worker/src/util/cli.ts b/packages/ws-worker/src/util/cli.ts index 6a1a2fede..1c7a2bf83 100644 --- a/packages/ws-worker/src/util/cli.ts +++ b/packages/ws-worker/src/util/cli.ts @@ -16,12 +16,12 @@ type Args = { log?: LogLevel; lightningPublicKey?: string; mock?: boolean; - backoff?: string; + backoff: string; capacity?: number; runMemory?: number; payloadMemory?: number; statePropsToRemove?: string[]; - maxRunDurationSeconds?: number; + maxRunDurationSeconds: number; socketTimeoutSeconds?: number; }; diff --git a/packages/ws-worker/test/channels/worker-queue.test.ts b/packages/ws-worker/test/channels/worker-queue.test.ts index eef728cba..d87f1e834 100644 --- a/packages/ws-worker/test/channels/worker-queue.test.ts +++ b/packages/ws-worker/test/channels/worker-queue.test.ts @@ -11,17 +11,21 @@ const logger = createMockLogger(); test('should connect', async (t) => { return new Promise((done) => { - connectToWorkerQueue('www', 'a', 'secret', logger, mockSocket as any).on( - 'connect', - ({ socket, channel }) => { - t.truthy(socket); - t.truthy(socket.connect); - t.truthy(channel); - t.truthy(channel.join); - t.pass('connected'); - done(); - } - ); + connectToWorkerQueue( + 'www', + 'a', + 'secret', + undefined, + logger, + mockSocket as any + ).on('connect', ({ socket, channel }) => { + t.truthy(socket); + t.truthy(socket.connect); + t.truthy(channel); + t.truthy(channel.join); + t.pass('connected'); + done(); + }); }); }); @@ -45,6 +49,7 @@ test('should connect with an auth token', async (t) => { 'www', workerId, secret, + undefined, logger, createSocket as any ).on('connect', ({ socket, channel }) => { @@ -74,10 +79,14 @@ test('should connect with api and worker versions', async (t) => { return socket; } - connectToWorkerQueue('www', 'a', 'secret', logger, createSocket as any).on( - 'connect', - done - ); + connectToWorkerQueue( + 'www', + 'a', + 'secret', + undefined, + logger, + createSocket as any + ).on('connect', done); }); }); @@ -105,6 +114,7 @@ test('should fail to connect with an invalid auth token', async (t) => { 'www', workerId, 'wrong-secret!', + undefined, logger, createSocket as any ).on('error', (e) => {