diff options
author | James M Snell <jasnell@gmail.com> | 2018-08-21 13:38:59 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-08-24 10:32:09 -0700 |
commit | d495e40bf7c75c689df75b09ae1bf9a92f3eb584 (patch) | |
tree | e1616a74cf3ebb3062332fffe7d7c50766a825cb /test/parallel/test-gc-http-client-timeout.js | |
parent | 3579ec4171734fea65e52d385594a35a40bcde8f (diff) | |
download | android-node-v8-d495e40bf7c75c689df75b09ae1bf9a92f3eb584.tar.gz android-node-v8-d495e40bf7c75c689df75b09ae1bf9a92f3eb584.tar.bz2 android-node-v8-d495e40bf7c75c689df75b09ae1bf9a92f3eb584.zip |
test: move common.onGC to individual module
Incrementally making `require('../common')` less of a monolith.
Move the `common.onGC()` utility to a separate standalone module
that is only imported when it's actually needed.
PR-URL: https://github.com/nodejs/node/pull/22446
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test/parallel/test-gc-http-client-timeout.js')
-rw-r--r-- | test/parallel/test-gc-http-client-timeout.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/parallel/test-gc-http-client-timeout.js b/test/parallel/test-gc-http-client-timeout.js index e5cb91c06f..4b4d1610c3 100644 --- a/test/parallel/test-gc-http-client-timeout.js +++ b/test/parallel/test-gc-http-client-timeout.js @@ -3,7 +3,8 @@ // just like test-gc-http-client.js, // but with a timeout set -const common = require('../common'); +require('../common'); +const onGC = require('../common/ongc'); function serverHandler(req, res) { setTimeout(function() { @@ -45,7 +46,7 @@ function getall() { }); count++; - common.onGC(req, { ongc }); + onGC(req, { ongc }); })(); setImmediate(getall); |