#51255 makes the following test fail:
import{test}from'node:test'importassertfrom'node:assert'test('repro',async(t)=>{constbuf=newUint8Array(1)constreadable=newReadableStream({start(controller){controller.enqueue(buf)controller.close()}})const[out1,out2]=readable.tee()constcloned=structuredClone(out2,{transfer: [out2]})forawait(constchunkofcloned){assert.deepStrictEqual(chunk,buf)}forawait(constchunkofout2){assert.deepStrictEqual(chunk,buf)}forawait(constchunkofout1){assert.deepStrictEqual(chunk,buf)}})with:
✖ repro (5.626125ms)
'Promise resolution is still pending but the event loop has already resolved'
ℹ tests 1
ℹ suites 0
ℹ pass 0
ℹ fail 0
ℹ cancelled 1
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 8.293458
✖ failing tests:
test at file:/Users/matteo/Repositories/node/repro.mjs:6:1
✖ repro (5.626125ms)
'Promise resolution is still pending but the event loop has already resolved'
It seems that #51255 unveiled a problem of a lingering promise not being resolved properly after the two MessagePorts have been closed.
This emerged in undici, see nodejs/undici#2617 for more details.
#51255 makes the following test fail:
with:
It seems that #51255 unveiled a problem of a lingering promise not being resolved properly after the two
MessagePorts have been closed.This emerged in undici, see nodejs/undici#2617 for more details.