feat: add Pi conversation worker pool
This commit is contained in:
@@ -233,12 +233,15 @@ describe('Pi worker process', () => {
|
||||
|
||||
it('settles every pending command after an unexpected exit', async () => {
|
||||
const worker = await makeWorker();
|
||||
const invalidations: string[] = [];
|
||||
worker.subscribeInvalidation((error) => invalidations.push(error.code));
|
||||
const pending = worker.request({ type: 'no_response' });
|
||||
const crash = worker.request({ type: 'crash' });
|
||||
|
||||
await expect(Promise.all([pending, crash])).rejects.toMatchObject({ code: 'PI_RPC_EXITED' });
|
||||
expect(worker.pendingCommandCount).toBe(0);
|
||||
expect(worker.generation).toBe(2);
|
||||
expect(invalidations).toEqual(['PI_RPC_EXITED']);
|
||||
});
|
||||
|
||||
it('keeps only bounded redacted stderr diagnostics', async () => {
|
||||
|
||||
Reference in New Issue
Block a user