From 7dcd252d281dfc3f2dd62260d27573901791c4b6 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sat, 5 Oct 2024 11:52:04 +0200 Subject: [PATCH] fix all udx leaks in tests --- test/replicate.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/replicate.js b/test/replicate.js index 95a9c057..5c37094e 100644 --- a/test/replicate.js +++ b/test/replicate.js @@ -1341,6 +1341,9 @@ test('cancel block', async function (t) { t.ok(a.replicator.stats.wireCancel.rx > 0, 'wireCancel stats incremented') t.is(a.replicator.stats.wireCancel.rx, b.replicator.stats.wireCancel.tx, 'wireCancel stats consistent') + + n1.destroy() + n2.destroy() }) test('try cancel block from a different session', async function (t) { @@ -1378,6 +1381,9 @@ test('try cancel block from a different session', async function (t) { await a.close() await b.close() + + n1.destroy() + n2.destroy() }) test('retry failed block requests to another peer', async function (t) { @@ -1415,6 +1421,15 @@ test('retry failed block requests to another peer', async function (t) { t.alike(await c.get(0), b4a.from('1')) + n1.destroy() + n2.destroy() + + n3.destroy() + n4.destroy() + + n5.destroy() + n6.destroy() + async function onupload (core, name) { t.pass('onupload: ' + name + ' (' + (once ? 'allow' : 'deny') + ')') @@ -1626,6 +1641,9 @@ test('session id reuse does not stall', async function (t) { t.pass('All blocks downloaded') t.is(downloaded, 100, 'Downloaded all blocks exactly once') + + n1.destroy() + n2.destroy() }) test('restore after cancelled block request', async function (t) { @@ -1654,6 +1672,9 @@ test('restore after cancelled block request', async function (t) { await new Promise(resolve => b.on('append', resolve)) t.is(b.length, a.length) + + n1.destroy() + n2.destroy() }) test('handshake is unslabbed', async function (t) {