Skip to content

Commit 1b2bd51

Browse files
committed
don't try init encodeerserver in test env
1 parent b69b9c6 commit 1b2bd51

File tree

1 file changed

+5
-0
lines changed
  • plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/project

1 file changed

+5
-0
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/project/ProjectContextProvider.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
88
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
99
import com.fasterxml.jackson.module.kotlin.readValue
1010
import com.intellij.openapi.Disposable
11+
import com.intellij.openapi.application.ApplicationManager
1112
import com.intellij.openapi.project.BaseProjectDirectories.Companion.getBaseDirectories
1213
import com.intellij.openapi.project.Project
1314
import com.intellij.openapi.vfs.VfsUtilCore
@@ -41,6 +42,10 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
4142

4243
init {
4344
cs.launch {
45+
if (ApplicationManager.getApplication().isUnitTestMode) {
46+
return@launch
47+
}
48+
4449
while (true) {
4550
if (encoderServer.isNodeProcessRunning()) {
4651
// TODO: need better solution for this

0 commit comments

Comments
 (0)