Commit c2cf47a2 authored by Rich Trott's avatar Rich Trott Committed by James M Snell
Browse files

benchmark: remove writing to benchmark directory

A benchmark for module loading creates a temporary directory in the
benchmark directory. Re-use the test common module to put the tmp
directory in test instead. This was causing intermittent test failures
because run.js (invoked by benchmark tests, mulitple of which could be
running at once) throws if a subdirectory of benchmark disappears at
just the wrong time.

There are other possible solutions than repurposing the `test/common`
module but two arguments for doing it this way are:

* There is already another benchmark file that does this
  (`http_server_for_chunky_client.js`) so the dependency already exists
  in the benchmarks.
* This also eliminates a re-implementation of rimraf in the benchmark
  code.

PR-URL: https://github.com/nodejs/node/pull/16144


Reviewed-By: default avatarJoyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: default avatarEvan Lucas <evanlucas@me.com>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: default avatarRefael Ackermann <refack@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent b41d215f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment