mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[gui-test] remove IdeProcessControlManager as obsolete, increase first start time to 240s
This commit is contained in:
+1
-1
@@ -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))
|
||||
|
||||
|
||||
|
||||
-42
@@ -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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user