Skip to content

Commit

Permalink
Merge pull request #515 from codacy/improve-timeout-http-helper
Browse files Browse the repository at this point in the history
increase connection and read timeouts
  • Loading branch information
DMarinhoCodacy authored Nov 25, 2024
2 parents b499a22 + aeb089e commit 880c138
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import scalaj.http.{Http, HttpOptions, HttpRequest, HttpResponse}

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

private lazy val connectionTimeoutMs = 2000
private lazy val readTimeoutMs = 5000
private lazy val connectionTimeoutMs = 5000
private lazy val readTimeoutMs = 15000

private val remoteUrl = apiUrl + "/2.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class ResultsUploaderSpec extends Specification with NoLanguageFeatures with Moc
val testDuplication =
Seq(DuplicationResult(language, DuplicationAnalysis.Success(Set.empty, Set(testClone(1), testClone(2)))))

uploader.sendResults(Seq.empty, Seq.empty, testDuplication) must beRight.awaitFor(10.seconds)
uploader.sendResults(Seq.empty, Seq.empty, testDuplication) must beRight.awaitFor(30.seconds)

there were no(codacyClient).sendRemoteIssues(
ArgumentMatchers.any[String],
Expand Down

0 comments on commit 880c138

Please sign in to comment.