Fixed a test that leaked a child process.

Review: https://reviews.apache.org/r/17673