benchmark: fix race condition on fs benchs
Some of these benchmarks fails even on main versions of Node.js.
This issue is caused because afterRead
is being called and is locking the temp file which makes the .on('exit')
fails to clean the temp file.
If we wait all the concurrent timers to finish, the issue is solved.
First found this issue on: https://github.com/nodejs/node/pull/49962