From 793a5bb4af17c9eaebab24d49a31b23685aaf783 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Sat, 21 Jul 2018 12:04:51 -0400 Subject: [PATCH] test: don't fail http2 abort test if 'data' is called multiple times PR-URL: https://github.com/nodejs/node/pull/21925 Reviewed-By: Rich Trott Reviewed-By: Anatoli Papirovski Reviewed-By: Luigi Pinca Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Matteo Collina --- test/parallel/test-http2-respond-with-file-connection-abort.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-http2-respond-with-file-connection-abort.js b/test/parallel/test-http2-respond-with-file-connection-abort.js index 6c8337ba8bc5b6..ed200e5b391fe8 100644 --- a/test/parallel/test-http2-respond-with-file-connection-abort.js +++ b/test/parallel/test-http2-respond-with-file-connection-abort.js @@ -24,7 +24,7 @@ server.listen(0, common.mustCall(() => { const req = client.request(); req.on('response', common.mustCall(() => {})); - req.on('data', common.mustCallAtLeast(() => { + req.once('data', common.mustCall(() => { net.Socket.prototype.destroy.call(client.socket); server.close(); }));