Files
PaperClipAI/packages
Priya RamanandPaperclip f160e5b6dc fix(db): make the teardown regression test detect the ordering defect
The test used to pass even when closeRegisteredClients did nothing: it
waited a fixed number of ticks before sending the late query, and by
then the driver had not yet cleared its socket reference, so the
query always rejected cleanly regardless of the fix. Wait for the
driver's own close callback instead of guessing a tick count, so the
late query lands exactly in the race the fix closes.

Also close a gap the new test surfaced: hostPortKey() throws on a URL
new URL() cannot parse, while the underlying driver does not. Skip the
registry entry in that case instead of throwing, and add a small test
for it.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-08-27 19:47:01 +00:00
..