Skip to content

Commit 9e79e54

Browse files
committed
don't try init encodeerserver in test env
1 parent 91ae00e commit 9e79e54

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
@@ -43,6 +44,10 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
4344

4445
init {
4546
cs.launch {
47+
if (ApplicationManager.getApplication().isUnitTestMode) {
48+
return@launch
49+
}
50+
4651
while (true) {
4752
if (encoderServer.isNodeProcessRunning()) {
4853
// TODO: need better solution for this

0 commit comments

Comments
 (0)