[gui-test] remove IdeProcessControlManager as obsolete, increase first start time to 240s

This commit is contained in:
Sergey Karashevich
2018-10-05 15:01:45 +03:00
parent 132e9a6fc6
commit f36fb604f7
2 changed files with 1 additions and 43 deletions
@@ -180,7 +180,7 @@ object GuiTestLocalLauncher {
}
private fun startIdeAndWait(ide: Ide, args: List<String>) = startIde(ide = ide, needToWait = true, timeOut = 180,
private fun startIdeAndWait(ide: Ide, args: List<String>) = startIde(ide = ide, needToWait = true, timeOut = 240,
ideaStartTest = ProcessBuilder().inheritIO().command(args))
@@ -1,42 +0,0 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.testGuiFramework.remote
import java.io.InputStream
import java.util.concurrent.TimeUnit
object IdeProcessControlManager {
@Volatile
private var currentIdeProcess: Process? = null
/**
* returns current Ide process
*/
private fun getIdeProcess(): Process {
return currentIdeProcess ?: throw Exception("Current IDE process is not initialised or already been killed")
}
/**
* adds a new IDE process to control
*/
fun submitIdeProcess(ideProcess: Process) {
currentIdeProcess = ideProcess
}
fun waitForCurrentProcess(): Int = getIdeProcess().waitFor()
fun waitForCurrentProcess(timeout: Long, timeUnit: TimeUnit): Boolean = getIdeProcess().waitFor(timeout, timeUnit)
fun exitValue(): Int = getIdeProcess().exitValue()
fun getErrorStream(): InputStream = getIdeProcess().errorStream
fun getInputStream(): InputStream = getIdeProcess().inputStream
/**
* kills IDE java process if the pipeline for sockets has been crashed or IDE doesn't respond
*/
fun killIdeProcess() {
currentIdeProcess?.destroyForcibly() ?: throw Exception("Current IDE process is not initialised or already been killed")
}
}