Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update async-http-client to 3.0.1 #243

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ val slf4jVersion = "2.0.16"

libraryDependencies ++= Seq(
"org.apache.solr" % "solr-solrj" % solrVersion,
"org.asynchttpclient" % "async-http-client" % "2.12.3",
"org.asynchttpclient" % "async-http-client" % "3.0.1",
"org.scala-lang.modules" %% "scala-xml" % "2.3.0",
"org.scala-lang.modules" %% "scala-java8-compat"% "1.0.2",
"io.dropwizard.metrics" % "metrics-core" % "4.2.29" % "optional",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.ino.solrs

import java.net.ConnectException
import java.time.{Duration => JavaDuration}
import java.util.concurrent.atomic.{AtomicBoolean, AtomicLong}
import java.util.concurrent.{ExecutionException, TimeUnit, TimeoutException}
import javax.servlet._
Expand All @@ -21,7 +22,7 @@ class PingStatusObserverIntegrationSpec extends AnyFunSpec with BeforeAndAfterAl
import PingStatusObserverIntegrationSpec._

private implicit val awaitTimeout: FiniteDuration = 2000 millis
private val httpClientTimeout = 100
private val httpClientTimeout = JavaDuration.ofMillis(100)
private val httpClient = new DefaultAsyncHttpClient(new DefaultAsyncHttpClientConfig.Builder().setRequestTimeout(httpClientTimeout).build)

protected var solrRunner: SolrRunner = _
Expand Down Expand Up @@ -94,7 +95,7 @@ class PingStatusObserverIntegrationSpec extends AnyFunSpec with BeforeAndAfterAl
solrServers(0).status should be (Enabled)

responseDelayMillis.set(5000)
val httpClientConfig = new DefaultAsyncHttpClientConfig.Builder().setReadTimeout(100).build()
val httpClientConfig = new DefaultAsyncHttpClientConfig.Builder().setReadTimeout(JavaDuration.ofMillis(100)).build()
val asyncHttpClient = new DefaultAsyncHttpClient(httpClientConfig)
try {

Expand Down Expand Up @@ -135,7 +136,7 @@ class PingStatusObserverIntegrationSpec extends AnyFunSpec with BeforeAndAfterAl

private def enable(solrUrl: String, timeoutInMillis: Long = 600) = pingAction(solrUrl, "enable", timeoutInMillis)
private def disable(solrUrl: String) = pingAction(solrUrl, "disable")
private def pingAction(solrUrl: String, action: String, timeoutInMillis: Long = httpClientTimeout * 2) =
private def pingAction(solrUrl: String, action: String, timeoutInMillis: Long = httpClientTimeout.toMillis * 2) =
httpClient.prepareGet(s"$solrUrl/admin/ping?action=$action").execute().get(timeoutInMillis, TimeUnit.MILLISECONDS)

}
Expand Down
Loading