diff --git a/acme-bom/build.gradle b/acme-bom/build.gradle index af06f50f..d09dfd73 100644 --- a/acme-bom/build.gradle +++ b/acme-bom/build.gradle @@ -1,3 +1,11 @@ plugins { id "io.micronaut.build.internal.bom" } + +micronautBom { + suppressions { + // as of micronaut-acme 5.0.0 + // acme removed this acme4j-utils and included it in the acme4j-client lib as of v3.0.0 + acceptedLibraryRegressions.add("acme4j-utils") + } +} diff --git a/acme/build.gradle b/acme/build.gradle index 288db9a1..396b6128 100644 --- a/acme/build.gradle +++ b/acme/build.gradle @@ -9,7 +9,6 @@ dependencies { implementation mn.micronaut.http.server implementation mn.micronaut.http.server.netty implementation libs.managed.acme4j.client - implementation libs.managed.acme4j.utils implementation libs.netty.tcnative.boringssl.static compileOnly libs.netty.incubator.codec.http3 testImplementation(mnSerde.micronaut.serde.jackson) diff --git a/acme/src/test/groovy/io/micronaut/acme/AcmeCertRefresherTaskSetsTimeoutSpec.groovy b/acme/src/test/groovy/io/micronaut/acme/AcmeCertRefresherTaskSetsTimeoutSpec.groovy index fa5ebcfe..1a2c64e2 100644 --- a/acme/src/test/groovy/io/micronaut/acme/AcmeCertRefresherTaskSetsTimeoutSpec.groovy +++ b/acme/src/test/groovy/io/micronaut/acme/AcmeCertRefresherTaskSetsTimeoutSpec.groovy @@ -12,13 +12,11 @@ import org.testcontainers.shaded.org.apache.commons.lang3.exception.ExceptionUti import spock.lang.AutoCleanup import spock.lang.Shared import spock.lang.Specification -import spock.lang.Stepwise -import spock.lang.Unroll +import java.net.http.HttpTimeoutException import java.security.KeyPair import java.time.Duration -@Stepwise class AcmeCertRefresherTaskSetsTimeoutSpec extends Specification { public static final String EXPECTED_DOMAIN = "localhost" @@ -91,8 +89,7 @@ class AcmeCertRefresherTaskSetsTimeoutSpec extends Specification { ] as Map } - @Unroll - def "validate timeout applied if signup is slow"(SlowServerConfig config) { + def "validate timeout applied if signup is #config"(SlowServerConfig config) { given: "we have all the ports we could ever need" expectedHttpPort = SocketUtils.findAvailableTcpPort() expectedSecurePort = SocketUtils.findAvailableTcpPort() @@ -121,8 +118,8 @@ class AcmeCertRefresherTaskSetsTimeoutSpec extends Specification { ane?.message == "Network error" Throwable rootEx = ExceptionUtils.getRootCause(ex) - rootEx instanceof SocketTimeoutException - rootEx.message == "Read timed out" + rootEx instanceof HttpTimeoutException + rootEx.message == "request timed out" cleanup: appServer?.stop() @@ -136,9 +133,14 @@ class AcmeCertRefresherTaskSetsTimeoutSpec extends Specification { } class ActualSlowServerConfig implements SlowServerConfig { + boolean slowSignup boolean slowOrdering boolean slowAuthorization Duration duration = Duration.ofSeconds(networkTimeoutInSecs + 2) + + String toString() { + "slowSignup: $slowSignup, slowOrdering: $slowOrdering, slowAuthorization: $slowAuthorization, duration: $duration" + } } } diff --git a/gradle.properties b/gradle.properties index 16618e82..eee17205 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -projectVersion=4.1.1-SNAPSHOT +projectVersion=5.0.0-SNAPSHOT projectGroup=io.micronaut.acme title=Micronaut Acme diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ca2b02ba..eaee9487 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,17 +1,17 @@ [versions] micronaut-docs = '2.0.0' micronaut = "4.1.11" -micronaut-platform = "4.0.0-RC1" -micronaut-test = "4.0.0" +micronaut-platform = "4.1.6" +micronaut-test = "4.1.0" -groovy = "4.0.12" +groovy = "4.0.15" spock = '2.3-groovy-4.0' testcontainers = "1.19.1" netty-http3 = "0.0.21.Final" -managed-acme4j = "2.16" -micronaut-serde = "2.3.0" -micronaut-validation = "4.0.3" +managed-acme4j = "3.1.0" +micronaut-serde = "2.3.3" +micronaut-validation = "4.1.0" micronaut-gradle-plugin = "4.1.2" [libraries] @@ -19,7 +19,6 @@ micronaut-gradle-plugin = "4.1.2" micronaut-core = { module = 'io.micronaut:micronaut-core-bom', version.ref = 'micronaut' } managed-acme4j-client = { module = 'org.shredzone.acme4j:acme4j-client', version.ref = 'managed-acme4j' } -managed-acme4j-utils = { module = 'org.shredzone.acme4j:acme4j-utils', version.ref = 'managed-acme4j' } micronaut-serde = { module = 'io.micronaut.serde:micronaut-serde-bom', version.ref = 'micronaut-serde' } micronaut-validation = { module = "io.micronaut.validation:micronaut-validation-bom", version.ref = "micronaut-validation" }