Fix Daemon compiler tests on Windows

In 202 platform tearDown tries to remove temporary directory, but this
fails on Windows, because while Daemon is active directory can't be
deleted.

Original commit: 2ffedd2731
This commit is contained in:
Nikolay Krasko
2020-12-01 16:08:08 +03:00
parent 6dfc26f4ab
commit 44c925f17a
4 changed files with 55 additions and 30 deletions
@@ -54,6 +54,16 @@ class JpsKotlinCompilerRunner {
private var _jpsCompileServiceSession: CompileServiceSession? = null
@TestOnly
fun shutdownDaemon() {
_jpsCompileServiceSession?.let {
try {
it.compileService.shutdown()
} catch (_: Throwable) {
}
}
_jpsCompileServiceSession = null
}
fun releaseCompileServiceSession() {
_jpsCompileServiceSession?.let {
try {