Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.intellij.execution.configurations.GeneralCommandLine
import com.intellij.execution.process.KillableProcessHandler
import com.intellij.openapi.Disposable
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.process.ProcessCloseUtil
import com.intellij.util.io.HttpRequests
Expand Down Expand Up @@ -56,6 +57,9 @@ class EncoderServer(val project: Project) : Disposable {
private val mapper = jacksonObjectMapper()

fun downloadArtifactsAndStartServer() {
if (ApplicationManager.getApplication().isUnitTestMode) {
return
}
downloadArtifactsIfNeeded()
start()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import com.intellij.openapi.Disposable
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.project.BaseProjectDirectories.Companion.getBaseDirectories
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VfsUtilCore
Expand Down Expand Up @@ -41,6 +42,10 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En

init {
cs.launch {
if (ApplicationManager.getApplication().isUnitTestMode) {
return@launch
}

while (true) {
if (encoderServer.isNodeProcessRunning()) {
// TODO: need better solution for this
Expand Down
Loading