jenkinsci/jenkins — pull request #814 by ikedam (2013-06-16 04:16:21+00:00)
Title: [JENKINS-18259] Fixed "Unable to delete slave.log" in Windows

When running plugin tests using slaves on Windows, they fail with following message:

hudson.util.IOException2: Failed to clean up temp dirs
...
Caused by: java.io.IOException: Unable to delete C:\Users\ikedam\AppData\Local\Temp\hudson4683007175849200528test\logs\slaves\slave0\slave.log

This is caused by:
* In `HudsonTestCase#tearDown` and `JenkinsRule#after`, slaves are still running and hold handles of log files.
* There are codes to close handles of slaves in `HudsonTestCase#tearDown` and `JenkinsRule#after`, but they does not work.
* a code in `HudsonTestCase` does not work since Jenkins 1.482.
* `@TestExtension` for an inner class of `HudsonTestCase` no longer works after 5dd905f2a2 and 4557a436bf .
* a code in `JenkinsRule` does not work from the beginning.
* `@TestExtension` for an inner class of `JenkinsRule` does not work from the beginning.

This patch do followings:
* Removed existing codes to close slave handles, which do not work.
* Close channels of running slaves in `HudsonTestCase#tearDown` or `JenkinsRule#after`.