diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 65007e599b..9bd09b8f72 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -5,7 +5,7 @@ object Dependencies { val NettyVersion = "4.1.112.Final" val NettyIncubatorVersion = "0.0.25.Final" val ScalaCompactCollectionVersion = "2.12.0" - val ZioVersion = "2.1.9" + val ZioVersion = "2.1.11" val ZioCliVersion = "0.5.0" val ZioJsonVersion = "0.7.1" val ZioParserVersion = "0.1.10" diff --git a/zio-http/jvm/src/test/scala/zio/http/security/SizeLimitsSpec.scala b/zio-http/jvm/src/test/scala/zio/http/security/SizeLimitsSpec.scala index 2926182a08..8e950a5692 100644 --- a/zio-http/jvm/src/test/scala/zio/http/security/SizeLimitsSpec.scala +++ b/zio-http/jvm/src/test/scala/zio/http/security/SizeLimitsSpec.scala @@ -35,6 +35,7 @@ object SizeLimitsSpec extends ZIOHttpSpec { val DEFAULT_URL_SIZE = 4096 val DEFAULT_HEADER_SIZE = 8192 val DEFAULT_CONTENT_SIZE = 1024 * 100 + val ERROR_MARGIN = 3 /* Checks that for `A` with size until `maxSize`, server responds with `Status.Ok` and `badStatus` after it. @@ -63,7 +64,7 @@ object SizeLimitsSpec extends ZIOHttpSpec { } info <- if (expected == status) loop(size + 1, lstTestSize, inc(size)(content), f, expected) - else if (size >= lstTestSize - 2) // adding margin for differences in scala 2 and scala 3 + else if (size >= lstTestSize - ERROR_MARGIN) // adding margin for differences in scala 2 and scala 3 ZIO.succeed(((size, expected), Some(content))) else ZIO.succeed(((size, status), None)) } yield info @@ -81,7 +82,7 @@ object SizeLimitsSpec extends ZIOHttpSpec { (lstWorkingSize1, lstStatus1) = info1 (lstWorkingSize2, lstStatus2) = info2 } yield assertTrue( - maxSize - lstWorkingSize1 <= 2, + maxSize - lstWorkingSize1 <= ERROR_MARGIN, maxSize - lstWorkingSize1 >= 0, lstStatus1 == Status.Ok, lstWorkingSize2 == lstTestSize,