fix: clean up upstream reader abort listener (#1378)

Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
This commit is contained in:
Isaac Sanchez-Hawkins
2026-05-23 20:48:16 +03:00
committed by GitHub
co-authored by Isaac Sanchez
parent 1d36995c47
commit 2b5408406c
2 changed files with 20 additions and 7 deletions
@@ -234,7 +234,7 @@ describe('createUpstreamSseReader', () => {
expect(attempt).toBe(2);
});
it('removes reconnect delay abort listeners after normal timeout completion', async () => {
it('removes abort listeners after stop', async () => {
const tracked = createTrackedSignal();
let attempt = 0;
let reader;
@@ -270,7 +270,6 @@ describe('createUpstreamSseReader', () => {
await reader.start();
expect(attempt).toBe(2);
// The top-level stop listener remains; the reconnect-delay listener should be removed.
expect(tracked.getListenerCount()).toBe(1);
expect(tracked.getListenerCount()).toBe(0);
});
});