test: speed up test-child-process-spawnsync.js
authorRich Trott <rtrott@gmail.com>
Tue, 25 Aug 2015 16:45:42 +0000 (09:45 -0700)
committerRich Trott <rtrott@gmail.com>
Tue, 25 Aug 2015 20:16:58 +0000 (13:16 -0700)
commitfffa4c25280bfeef6276fd7040f8c7286cfdbc43
treead9a128163f9687ac765f31442b215da85afbd1a
parentd895d4a320d37242c3daca382a313651c06c7441
test: speed up test-child-process-spawnsync.js

There's a bunch of stuff in test-child-process-spawnsync.js that seems
designed to test that it is in fact blocking/synchronous. However, that
code really just tests the OS sleep command. Change `sleep 1` to `sleep
0` and shave about one second off the test run.`

We check the return status to confirm the command is successful. The
tests in this file in general would not work if spawnSync() were
asynchronous. That includes this one, as a return status would not be
available if the command where asynchronous.

PR-URL: https://github.com/nodejs/node/pull/2542
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
test/parallel/test-child-process-spawnsync.js