Refactor daemon tests, some minor fixes in the client and daemon

Tests refactored for better readability and code reuse
Some shutdown livelock is fixed
Some logging added
This commit is contained in:
Ilya Chernikov
2017-04-06 12:56:59 +02:00
parent 7600b6de52
commit bec2ae7cab
3 changed files with 269 additions and 235 deletions
@@ -145,6 +145,7 @@ object KotlinCompilerClient {
compilerService.releaseCompileSession(sessionId)
}
@Deprecated("Use other compile method", ReplaceWith("compile"))
fun compile(compilerService: CompileService,
sessionId: Int,
targetPlatform: CompileService.TargetPlatform,
@@ -158,6 +159,7 @@ object KotlinCompilerClient {
}
@Deprecated("Use non-deprecated compile method", ReplaceWith("compile"))
fun incrementalCompile(compileService: CompileService,
sessionId: Int,
targetPlatform: CompileService.TargetPlatform,
@@ -308,6 +310,7 @@ object KotlinCompilerClient {
// --- Implementation ---------------------------------------
@Synchronized
private inline fun <R> connectLoop(reportingTargets: DaemonReportingTargets, body: () -> R?): R? {
try {
var attempts = 0