From 5635cac86d283a9531313925f7cc535fa577734a Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Tue, 12 May 2020 13:15:57 +0200 Subject: [PATCH] fixup! fix: don't resume while piping request --- test/client-pipelining.js | 43 --------------------------------------- 1 file changed, 43 deletions(-) diff --git a/test/client-pipelining.js b/test/client-pipelining.js index 792f8931c1a..1275669ea5b 100644 --- a/test/client-pipelining.js +++ b/test/client-pipelining.js @@ -373,49 +373,6 @@ test('pipelining non-idempotent', (t) => { }) }) -test('pipelining non-idempotent', (t) => { - t.plan(4) - - const server = createServer() - server.on('request', (req, res) => { - setTimeout(() => { - res.end('asd') - }, 10) - }) - t.tearDown(server.close.bind(server)) - - server.listen(0, () => { - const client = new Client(`http://localhost:${server.address().port}`, { - pipelining: 2 - }) - t.tearDown(client.close.bind(client)) - - let ended = false - client.request({ - path: '/', - method: 'GET' - }, (err, data) => { - t.error(err) - data.body - .resume() - .on('end', () => { - t.pass() - ended = true - }) - }) - - client.request({ - path: '/', - method: 'GET', - idempotent: false - }, (err, data) => { - t.error(err) - t.strictEqual(ended, true) - data.body.resume() - }) - }) -}) - test('pipelining non-idempotent w body', (t) => { t.plan(4)