diff --git a/async-http-client-backend/fs2/src/test/scala/sttp/client4/asynchttpclient/fs2/AsyncHttpClientFs2HttpTest.scala b/async-http-client-backend/fs2/src/test/scala/sttp/client4/asynchttpclient/fs2/AsyncHttpClientFs2HttpTest.scala index 8063e36af4..b5a08a7147 100644 --- a/async-http-client-backend/fs2/src/test/scala/sttp/client4/asynchttpclient/fs2/AsyncHttpClientFs2HttpTest.scala +++ b/async-http-client-backend/fs2/src/test/scala/sttp/client4/asynchttpclient/fs2/AsyncHttpClientFs2HttpTest.scala @@ -8,7 +8,4 @@ import sttp.client4.impl.cats.{CatsTestBase, TestIODispatcher} class AsyncHttpClientFs2HttpTest extends AsyncHttpClientHttpTest[IO] with TestIODispatcher with CatsTestBase { override val backend: Backend[IO] = AsyncHttpClientFs2Backend[IO](dispatcher = dispatcher).unsafeRunSync() - - // for some unknown reason this single test fails using the fs2 implementation - override def supportsConnectionRefusedTest = false } diff --git a/core/src/test/scala/sttp/client4/testing/HttpTest.scala b/core/src/test/scala/sttp/client4/testing/HttpTest.scala index 4e7665911a..520bf66fef 100644 --- a/core/src/test/scala/sttp/client4/testing/HttpTest.scala +++ b/core/src/test/scala/sttp/client4/testing/HttpTest.scala @@ -47,7 +47,6 @@ trait HttpTest[F[_]] protected def supportsRequestTimeout = true protected def supportsSttpExceptions = true - protected def supportsConnectionRefusedTest = true protected def supportsMultipart = true protected def supportsCustomMultipartContentType = true protected def supportsCustomMultipartEncoding = true @@ -640,21 +639,19 @@ trait HttpTest[F[_]] } } - if (supportsConnectionRefusedTest) { - "connection exceptions - connection refused" in { - val req = basicRequest - .get(uri"http://localhost:7918") - .response(asString) + "connection exceptions - connection refused" in { + val req = basicRequest + .get(uri"http://localhost:7918") + .response(asString) - Future(req.send(backend)).flatMap(_.toFuture()).failed.map { e => - info("Sending request failed", Some(e)) - try e shouldBe a[SttpClientException.ConnectException] - catch { - case t: Throwable => - info("Not a connect exception, printing stack trace") - e.printStackTrace() - throw t - } + Future(req.send(backend)).flatMap(_.toFuture()).failed.map { e => + info("Sending request failed", Some(e)) + try e shouldBe a[SttpClientException.ConnectException] + catch { + case t: Throwable => + info("Not a connect exception, printing stack trace") + e.printStackTrace() + throw t } } }