Skip to content

Commit 880c138

Browse files
Merge pull request #515 from codacy/improve-timeout-http-helper
increase connection and read timeouts
2 parents b499a22 + aeb089e commit 880c138

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/main/scala/com/codacy/analysis/core/utils/HttpHelper.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import scalaj.http.{Http, HttpOptions, HttpRequest, HttpResponse}
77

88
class HttpHelper(apiUrl: String, extraHeaders: Map[String, String], allowUnsafeSSL: Boolean) {
99

10-
private lazy val connectionTimeoutMs = 2000
11-
private lazy val readTimeoutMs = 5000
10+
private lazy val connectionTimeoutMs = 5000
11+
private lazy val readTimeoutMs = 15000
1212

1313
private val remoteUrl = apiUrl + "/2.0"
1414

core/src/test/scala/com.codacy.analysis.core/upload/ResultsUploaderSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class ResultsUploaderSpec extends Specification with NoLanguageFeatures with Moc
155155
val testDuplication =
156156
Seq(DuplicationResult(language, DuplicationAnalysis.Success(Set.empty, Set(testClone(1), testClone(2)))))
157157

158-
uploader.sendResults(Seq.empty, Seq.empty, testDuplication) must beRight.awaitFor(10.seconds)
158+
uploader.sendResults(Seq.empty, Seq.empty, testDuplication) must beRight.awaitFor(30.seconds)
159159

160160
there were no(codacyClient).sendRemoteIssues(
161161
ArgumentMatchers.any[String],

0 commit comments

Comments
 (0)