diff --git a/build.gradle.kts b/build.gradle.kts index ce95a317ea..e432a52ee6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -213,7 +213,7 @@ fun Test.sharedIntegrationTestConfig(buildCodyDir: File, mode: String) { "cody.autocomplete.enableFormatting" to (project.property("cody.autocomplete.enableFormatting") as String? ?: "true"), "cody.integration.testing" to "true", - "cody.ignore.policy.timeout" to 500, // Increased to 500ms as CI tends to be slower + "cody.ignore.policy.timeout" to 1500, // Increased to 1500ms as CI tends to be slower "idea.test.execution.policy" to "com.sourcegraph.cody.test.NonEdtIdeaTestExecutionPolicy", "test.resources.dir" to resourcesDir.absolutePath) diff --git a/src/main/kotlin/com/sourcegraph/cody/ignore/IgnoreOracle.kt b/src/main/kotlin/com/sourcegraph/cody/ignore/IgnoreOracle.kt index d1913f93e1..81cc308d1e 100644 --- a/src/main/kotlin/com/sourcegraph/cody/ignore/IgnoreOracle.kt +++ b/src/main/kotlin/com/sourcegraph/cody/ignore/IgnoreOracle.kt @@ -4,6 +4,7 @@ import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.application.runInEdt import com.intellij.openapi.components.Service import com.intellij.openapi.components.service +import com.intellij.openapi.diagnostic.Logger import com.intellij.openapi.editor.Editor import com.intellij.openapi.fileEditor.FileDocumentManager import com.intellij.openapi.fileEditor.FileEditorManager @@ -29,6 +30,8 @@ enum class IgnorePolicy(val value: String) { */ @Service(Service.Level.PROJECT) class IgnoreOracle(private val project: Project) { + private val logger = Logger.getInstance(IgnoreOracle::class.java) + data class CacheEntry(val policy: IgnorePolicy, val timestampMsec: Long) private val cache = SLRUMap(100, 100) @@ -136,6 +139,7 @@ class IgnoreOracle(private val project: Project) { return try { completable.get(policyAwaitTimeoutMs, TimeUnit.MILLISECONDS) } catch (timedOut: TimeoutException) { + logger.warn(timedOut) null } }