From eb3182d13acfae125bf16b8901fbf128dae9bfc0 Mon Sep 17 00:00:00 2001 From: Radu Sebastian LAZIN Date: Tue, 24 Nov 2026 02:57:03 +0200 Subject: [PATCH 1/5] Release `v1.3.3`. --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- apiphany-core/pom.xml | 2 +- apiphany-httpclient5/pom.xml | 2 +- apiphany-integration-tests/pom.xml | 2 +- apiphany-okhttp/pom.xml | 2 +- apiphany-spring/pom.xml | 2 +- apiphany-test/pom.xml | 2 +- integration/apiphany-httpclient5-tests/pom.xml | 2 +- integration/apiphany-json-jackson2-tests/pom.xml | 2 +- integration/apiphany-json-jackson3-tests/pom.xml | 2 +- integration/apiphany-json-no-dependency-tests/pom.xml | 2 +- integration/apiphany-okhttp-tests/pom.xml | 2 +- integration/apiphany-spring-no-client-tests/pom.xml | 2 +- integration/apiphany-spring-tests/pom.xml | 2 +- pom.xml | 2 +- 16 files changed, 20 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34748391..0aab445a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Release Notes +`1.3.3` + +--- + `1.3.2` - Added `Strings.nonBlankOrDefault(String, String)` to return a default when the value is blank. diff --git a/README.md b/README.md index 2b53316d..bd0fdada 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Support is being developed for other HTTP clients like Netty, Jersey, etc. If yo ### Releases -Current release `1.3.2` +Current release `1.3.3` ### Getting Started @@ -62,7 +62,7 @@ Maven: add this dependency to your `pom.xml` io.github.raduking apiphany - 1.3.2 + 1.3.3 ``` diff --git a/apiphany-core/pom.xml b/apiphany-core/pom.xml index 401b4494..206ae825 100644 --- a/apiphany-core/pom.xml +++ b/apiphany-core/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 apiphany diff --git a/apiphany-httpclient5/pom.xml b/apiphany-httpclient5/pom.xml index 0bf01a48..00ef5ada 100644 --- a/apiphany-httpclient5/pom.xml +++ b/apiphany-httpclient5/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 apiphany-httpclient5 diff --git a/apiphany-integration-tests/pom.xml b/apiphany-integration-tests/pom.xml index b9e52eeb..e1eb1b77 100644 --- a/apiphany-integration-tests/pom.xml +++ b/apiphany-integration-tests/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 apiphany-integration-tests diff --git a/apiphany-okhttp/pom.xml b/apiphany-okhttp/pom.xml index cacfcfaa..e308bf9f 100644 --- a/apiphany-okhttp/pom.xml +++ b/apiphany-okhttp/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 apiphany-okhttp diff --git a/apiphany-spring/pom.xml b/apiphany-spring/pom.xml index 11195f8d..71622485 100644 --- a/apiphany-spring/pom.xml +++ b/apiphany-spring/pom.xml @@ -7,7 +7,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 apiphany-spring diff --git a/apiphany-test/pom.xml b/apiphany-test/pom.xml index df2f5dfb..da585969 100644 --- a/apiphany-test/pom.xml +++ b/apiphany-test/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 apiphany-test diff --git a/integration/apiphany-httpclient5-tests/pom.xml b/integration/apiphany-httpclient5-tests/pom.xml index 1efc9ecb..7c121ff1 100644 --- a/integration/apiphany-httpclient5-tests/pom.xml +++ b/integration/apiphany-httpclient5-tests/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 ../../pom.xml diff --git a/integration/apiphany-json-jackson2-tests/pom.xml b/integration/apiphany-json-jackson2-tests/pom.xml index 0336b8ee..485728f7 100644 --- a/integration/apiphany-json-jackson2-tests/pom.xml +++ b/integration/apiphany-json-jackson2-tests/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 ../../pom.xml diff --git a/integration/apiphany-json-jackson3-tests/pom.xml b/integration/apiphany-json-jackson3-tests/pom.xml index f9707b76..7b087765 100644 --- a/integration/apiphany-json-jackson3-tests/pom.xml +++ b/integration/apiphany-json-jackson3-tests/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 ../../pom.xml diff --git a/integration/apiphany-json-no-dependency-tests/pom.xml b/integration/apiphany-json-no-dependency-tests/pom.xml index 5e0803a9..a6ac5aa4 100644 --- a/integration/apiphany-json-no-dependency-tests/pom.xml +++ b/integration/apiphany-json-no-dependency-tests/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 ../../pom.xml diff --git a/integration/apiphany-okhttp-tests/pom.xml b/integration/apiphany-okhttp-tests/pom.xml index 90b6acb7..e283d937 100644 --- a/integration/apiphany-okhttp-tests/pom.xml +++ b/integration/apiphany-okhttp-tests/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 ../../pom.xml diff --git a/integration/apiphany-spring-no-client-tests/pom.xml b/integration/apiphany-spring-no-client-tests/pom.xml index 72f85be2..e89e443c 100644 --- a/integration/apiphany-spring-no-client-tests/pom.xml +++ b/integration/apiphany-spring-no-client-tests/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 ../../pom.xml diff --git a/integration/apiphany-spring-tests/pom.xml b/integration/apiphany-spring-tests/pom.xml index 19c7a847..278f9a8b 100644 --- a/integration/apiphany-spring-tests/pom.xml +++ b/integration/apiphany-spring-tests/pom.xml @@ -8,7 +8,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 ../../pom.xml diff --git a/pom.xml b/pom.xml index 313f3dae..01f21c45 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ io.github.raduking apiphany-parent - 1.3.2 + 1.3.3 pom ${project.groupId}:${project.artifactId} From 0ccc9075676a48adfe81de88cc1aa610eaa3f2fb Mon Sep 17 00:00:00 2001 From: raduking Date: Tue, 24 Nov 2026 04:32:34 +0200 Subject: [PATCH 2/5] Fix race condition on closing and adding a new OAuth2 provider. --- .../oauth2/OAuth2TokenProviderRegistry.java | 10 ++++ .../OAuth2TokenProviderRegistryTest.java | 47 +++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/apiphany-core/src/main/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistry.java b/apiphany-core/src/main/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistry.java index 3b7f9c39..4f2fbe00 100644 --- a/apiphany-core/src/main/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistry.java +++ b/apiphany-core/src/main/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistry.java @@ -158,6 +158,9 @@ public static OAuth2TokenProviderRegistry of(final OAuth2Properties oAuth2Proper /** * Adds a new OAuth2 token provider to the registry. + *

+ * If the registry is closed concurrently with this call, the provider is either closed by {@link #close()} or by this + * method (and the call throws), but it can be closed by both, so closing a token provider must be idempotent. * * @param name the name of the OAuth2 token provider * @param provider the OAuth2 token provider @@ -178,6 +181,13 @@ public void addProvider(final String name, final ScopedResource LOGGER.error("Error closing candidate OAuth2 token provider: '{}' when a provider with the same name exists.", name, e)); throw new IllegalStateException("An OAuth2 token provider with name '" + name + "' is already registered."); } + // close() could have finished iterating between the check above and the put, in which case nobody would ever close + // this provider, if close() also saw the provider it is closed twice, which is fine because close must be idempotent + if (closing.get()) { + provider.closeIfManaged( + e -> LOGGER.error("Error closing OAuth2 token provider: '{}' when adding to a closing registry.", name, e)); + throw new IllegalStateException("Cannot add new OAuth2 token provider " + name + " to a closing registry."); + } } /** diff --git a/apiphany-core/src/test/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistryTest.java b/apiphany-core/src/test/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistryTest.java index aea2950d..f2af35b6 100644 --- a/apiphany-core/src/test/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistryTest.java +++ b/apiphany-core/src/test/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistryTest.java @@ -15,13 +15,16 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; +import java.time.Duration; import java.time.Instant; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; import java.util.function.BiConsumer; import java.util.function.Consumer; @@ -30,7 +33,10 @@ import org.apiphany.security.AuthenticationTokenProvider; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; +import org.morphix.lang.function.ThrowingRunnable; import org.morphix.lang.resource.ScopedResource; +import org.morphix.lang.thread.Threads; +import org.morphix.reflection.Fields; /** * Test class for {@link OAuth2TokenProviderRegistry}. @@ -57,6 +63,7 @@ class OAuth2TokenProviderRegistryTest { private static final int THREADS = 200; private static final int CLOSE_COUNT = 10; + private static final long WAIT_SECONDS = 5; private static final long EXPIRES_IN = 300; private static final Instant DEFAULT_EXPIRATION = Instant.now(); @@ -860,6 +867,46 @@ void shouldBeThreadSafeForConcurrentAddAndClose() throws Exception { } } + @Test + @SuppressWarnings({ "unchecked", "resource" }) + void shouldCloseProviderWhenCloseIsCalledWhileTheProviderIsBeingAdded() throws Exception { + OAuth2Registry mockRegistry = mock(OAuth2Registry.class); + OAuth2TokenProviderRegistry registry = OAuth2TokenProviderRegistry.of(mockRegistry); + + CountDownLatch addingGate = new CountDownLatch(1); + CountDownLatch continueAddGate = new CountDownLatch(1); + + // pauses the adding thread right after it checked that the registry is not closing + Map> pausingProviders = new ConcurrentHashMap<>() { + @Override + public ScopedResource putIfAbsent(final String key, final ScopedResource value) { + addingGate.countDown(); + Threads.safeWait(continueAddGate, Duration.ofSeconds(WAIT_SECONDS)); + return super.putIfAbsent(key, value); + } + }; + Fields.IgnoreAccess.set(registry, "providers", pausingProviders); + + ScopedResource tokenProvider = mock(ScopedResource.class); + doReturn(mock(OAuth2TokenProvider.class)).when(tokenProvider).unwrap(); + + Thread addThread = Thread.ofPlatform() + .start(() -> registry.addProvider(PROVIDER_NAME_MY_PROVIDER, tokenProvider)); + addingGate.await(WAIT_SECONDS, TimeUnit.SECONDS); + + Thread closeThread = Thread.ofPlatform() + .start(ThrowingRunnable.unchecked(() -> registry.close())); + // wait for close to finish iterating over an empty map before the provider is put in the map + closeThread.join(TimeUnit.SECONDS.toMillis(WAIT_SECONDS)); + continueAddGate.countDown(); + + addThread.join(TimeUnit.SECONDS.toMillis(WAIT_SECONDS)); + closeThread.join(TimeUnit.SECONDS.toMillis(WAIT_SECONDS)); + + assertThat(registry.getProviderNames(), contains(PROVIDER_NAME_MY_PROVIDER)); + verify(tokenProvider).closeIfManaged(any(Consumer.class)); + } + @Test @SuppressWarnings({ "unchecked", "resource" }) void shouldNotCallCloseOnAllProvidersEvenIfRegistryCloseIsCalledMultipleTimes() throws Exception { From db95374e1fefbe61d9fa50a25b272ac86c995e56 Mon Sep 17 00:00:00 2001 From: raduking Date: Tue, 24 Nov 2026 04:47:15 +0200 Subject: [PATCH 3/5] Log expected exceptions in test. --- .../security/oauth2/OAuth2TokenProviderRegistryTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apiphany-core/src/test/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistryTest.java b/apiphany-core/src/test/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistryTest.java index f2af35b6..d234182e 100644 --- a/apiphany-core/src/test/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistryTest.java +++ b/apiphany-core/src/test/java/org/apiphany/security/oauth2/OAuth2TokenProviderRegistryTest.java @@ -29,10 +29,12 @@ import java.util.function.Consumer; import org.apiphany.lang.Strings; +import org.apiphany.logging.slf4j.Slf4jLoggerAdapter; import org.apiphany.security.AuthenticationToken; import org.apiphany.security.AuthenticationTokenProvider; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; +import org.morphix.lang.function.LoggerAdapter; import org.morphix.lang.function.ThrowingRunnable; import org.morphix.lang.resource.ScopedResource; import org.morphix.lang.thread.Threads; @@ -45,6 +47,8 @@ */ class OAuth2TokenProviderRegistryTest { + private static final LoggerAdapter LOGGER = Slf4jLoggerAdapter.of(OAuth2ClientRegistrationTest.class); + private static final String PROVIDER_NAME_MY_PROVIDER = "myProvider"; private static final String PROVIDER_NAME_GOOD = "good"; private static final String PROVIDER_NAME_BAD = "bad"; @@ -825,6 +829,7 @@ void shouldBeThreadSafeForConcurrentAddAndClose() throws Exception { registry.addProvider(PROVIDER_NAME_MY_PROVIDER, resource); } catch (Exception ignored) { // expected exception when duplicate or closing + LOGGER.info("Expected: {}: {}", ignored.getClass().getName(), ignored.getMessage()); } finally { doneTasksGate.countDown(); } From 007cde2bb21a796e2f9e155e1c557dac2807f2ec Mon Sep 17 00:00:00 2001 From: raduking Date: Fri, 27 Nov 2026 13:00:28 +0200 Subject: [PATCH 4/5] Ignore Maven warnings in Eclipse for overriding Jackson versions. --- apiphany-core/pom.xml | 16 ++++++++-------- apiphany-httpclient5/pom.xml | 12 ++++++------ apiphany-okhttp/pom.xml | 2 +- integration/apiphany-json-jackson2-tests/pom.xml | 6 +++--- integration/apiphany-json-jackson3-tests/pom.xml | 4 ++-- .../apiphany-spring-no-client-tests/pom.xml | 4 ++-- integration/apiphany-spring-tests/pom.xml | 6 +++--- pom.xml | 2 +- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/apiphany-core/pom.xml b/apiphany-core/pom.xml index 206ae825..c987dde9 100644 --- a/apiphany-core/pom.xml +++ b/apiphany-core/pom.xml @@ -89,7 +89,7 @@ com.fasterxml.jackson.core jackson-core - ${jackson2.version} + ${jackson2.version} provided true @@ -97,7 +97,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson2.version} + ${jackson2.version} provided true @@ -105,7 +105,7 @@ com.fasterxml.jackson.datatype jackson-datatype-jsr310 - ${jackson2.version} + ${jackson2.version} provided true @@ -113,7 +113,7 @@ com.fasterxml.jackson.datatype jackson-datatype-jdk8 - ${jackson2.version} + ${jackson2.version} provided true @@ -121,7 +121,7 @@ com.fasterxml.jackson.dataformat jackson-dataformat-xml - ${jackson2.version} + ${jackson2.version} provided true @@ -129,7 +129,7 @@ tools.jackson.core jackson-core - ${jackson3.version} + ${jackson3.version} provided true @@ -137,7 +137,7 @@ tools.jackson.core jackson-databind - ${jackson3.version} + ${jackson3.version} provided true @@ -145,7 +145,7 @@ tools.jackson.dataformat jackson-dataformat-xml - ${jackson3.version} + ${jackson3.version} provided true diff --git a/apiphany-httpclient5/pom.xml b/apiphany-httpclient5/pom.xml index 00ef5ada..efff5b09 100644 --- a/apiphany-httpclient5/pom.xml +++ b/apiphany-httpclient5/pom.xml @@ -82,7 +82,7 @@ com.fasterxml.jackson.datatype jackson-datatype-jsr310 - ${jackson2.version} + ${jackson2.version} provided true @@ -90,7 +90,7 @@ com.fasterxml.jackson.datatype jackson-datatype-jdk8 - ${jackson2.version} + ${jackson2.version} provided true @@ -98,7 +98,7 @@ com.fasterxml.jackson.dataformat jackson-dataformat-xml - ${jackson2.version} + ${jackson2.version} provided true @@ -106,7 +106,7 @@ tools.jackson.core jackson-databind - ${jackson3.version} + ${jackson3.version} provided true @@ -114,7 +114,7 @@ tools.jackson.dataformat jackson-dataformat-xml - ${jackson3.version} + ${jackson3.version} provided true @@ -137,7 +137,7 @@ com.fasterxml.jackson.dataformat jackson-dataformat-yaml - ${jackson2.version} + ${jackson2.version} test diff --git a/apiphany-okhttp/pom.xml b/apiphany-okhttp/pom.xml index e308bf9f..a90e2ab1 100644 --- a/apiphany-okhttp/pom.xml +++ b/apiphany-okhttp/pom.xml @@ -96,7 +96,7 @@ com.fasterxml.jackson.dataformat jackson-dataformat-yaml - ${jackson2.version} + ${jackson2.version} test diff --git a/integration/apiphany-json-jackson2-tests/pom.xml b/integration/apiphany-json-jackson2-tests/pom.xml index 485728f7..d92ac573 100644 --- a/integration/apiphany-json-jackson2-tests/pom.xml +++ b/integration/apiphany-json-jackson2-tests/pom.xml @@ -57,7 +57,7 @@ com.fasterxml.jackson.datatype jackson-datatype-jsr310 - ${jackson2.version} + ${jackson2.version} provided true @@ -65,7 +65,7 @@ com.fasterxml.jackson.datatype jackson-datatype-jdk8 - ${jackson2.version} + ${jackson2.version} provided true @@ -73,7 +73,7 @@ com.fasterxml.jackson.dataformat jackson-dataformat-xml - ${jackson2.version} + ${jackson2.version} provided true diff --git a/integration/apiphany-json-jackson3-tests/pom.xml b/integration/apiphany-json-jackson3-tests/pom.xml index 7b087765..229e0e86 100644 --- a/integration/apiphany-json-jackson3-tests/pom.xml +++ b/integration/apiphany-json-jackson3-tests/pom.xml @@ -57,7 +57,7 @@ tools.jackson.core jackson-databind - ${jackson3.version} + ${jackson3.version} provided true @@ -65,7 +65,7 @@ tools.jackson.dataformat jackson-dataformat-xml - ${jackson3.version} + ${jackson3.version} provided true diff --git a/integration/apiphany-spring-no-client-tests/pom.xml b/integration/apiphany-spring-no-client-tests/pom.xml index e89e443c..76479c70 100644 --- a/integration/apiphany-spring-no-client-tests/pom.xml +++ b/integration/apiphany-spring-no-client-tests/pom.xml @@ -70,13 +70,13 @@ tools.jackson.core jackson-databind - ${jackson3.version} + ${jackson3.version} tools.jackson.dataformat jackson-dataformat-xml - ${jackson3.version} + ${jackson3.version} diff --git a/integration/apiphany-spring-tests/pom.xml b/integration/apiphany-spring-tests/pom.xml index 278f9a8b..cac5e65a 100644 --- a/integration/apiphany-spring-tests/pom.xml +++ b/integration/apiphany-spring-tests/pom.xml @@ -99,7 +99,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson2.version} + ${jackson2.version} test @@ -107,13 +107,13 @@ tools.jackson.core jackson-databind - ${jackson3.version} + ${jackson3.version} tools.jackson.dataformat jackson-dataformat-xml - ${jackson3.version} + ${jackson3.version} diff --git a/pom.xml b/pom.xml index 01f21c45..65830cc6 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,7 @@ - 1.1.3 + 1.1.4 1.17.3 2.21 2.21.8 From 4537213ff17cd534452cea825e799e1de5d1b459 Mon Sep 17 00:00:00 2001 From: Radu Sebastian LAZIN Date: Sun, 29 Nov 2026 04:43:07 +0200 Subject: [PATCH 5/5] Use `127.0.0.1` instead of `localhost`. --- CHANGELOG.md | 2 ++ .../java/org/apiphany/tests/ApiClientWithDefaultClientIT.java | 1 + .../apiphany/tests/ApiClientWithDefaultClientRedirectsIT.java | 1 + .../src/test/java/org/apiphany/tests/ApiEphemeralIT.java | 4 +++- .../src/test/java/org/apiphany/tests/ApiIT.java | 4 +++- .../tests/security/ApiClientWithDefaultClientSecurityIT.java | 1 + 6 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aab445a..2b1f9237 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ `1.3.3` +- Upgraded `morphix-all` to `1.1.4`. + --- `1.3.2` diff --git a/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiClientWithDefaultClientIT.java b/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiClientWithDefaultClientIT.java index eda75542..78846fd1 100644 --- a/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiClientWithDefaultClientIT.java +++ b/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiClientWithDefaultClientIT.java @@ -52,6 +52,7 @@ public class ApiClientWithDefaultClientIT implements ApiphanyContract { private final WireMockExtension wiremock = WireMockExtension.newInstance() .options(options() + .bindAddress("127.0.0.1") .dynamicPort()) .build(); diff --git a/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiClientWithDefaultClientRedirectsIT.java b/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiClientWithDefaultClientRedirectsIT.java index 4746a4e0..4172316b 100644 --- a/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiClientWithDefaultClientRedirectsIT.java +++ b/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiClientWithDefaultClientRedirectsIT.java @@ -25,6 +25,7 @@ public class ApiClientWithDefaultClientRedirectsIT implements ApiphanyContract { private final WireMockExtension wiremock = WireMockExtension.newInstance() .options(options() + .bindAddress("127.0.0.1") .dynamicPort()) .build(); diff --git a/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiEphemeralIT.java b/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiEphemeralIT.java index 784da58d..da02b97c 100644 --- a/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiEphemeralIT.java +++ b/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiEphemeralIT.java @@ -28,7 +28,9 @@ class ApiEphemeralIT { @RegisterExtension static final WireMockExtension wiremock = WireMockExtension.newInstance() - .options(options().dynamicPort()) + .options(options() + .bindAddress("127.0.0.1") + .dynamicPort()) .build(); @Test diff --git a/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiIT.java b/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiIT.java index c8d3deb4..ffc3d91f 100644 --- a/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiIT.java +++ b/apiphany-integration-tests/src/test/java/org/apiphany/tests/ApiIT.java @@ -29,7 +29,9 @@ public class ApiIT { @RegisterExtension static final WireMockExtension wiremock = WireMockExtension.newInstance() - .options(options().dynamicPort()) + .options(options() + .bindAddress("127.0.0.1") + .dynamicPort()) .build(); public ExchangeClient client() { diff --git a/apiphany-integration-tests/src/test/java/org/apiphany/tests/security/ApiClientWithDefaultClientSecurityIT.java b/apiphany-integration-tests/src/test/java/org/apiphany/tests/security/ApiClientWithDefaultClientSecurityIT.java index 1bec9eeb..6ef759bf 100644 --- a/apiphany-integration-tests/src/test/java/org/apiphany/tests/security/ApiClientWithDefaultClientSecurityIT.java +++ b/apiphany-integration-tests/src/test/java/org/apiphany/tests/security/ApiClientWithDefaultClientSecurityIT.java @@ -36,6 +36,7 @@ public class ApiClientWithDefaultClientSecurityIT implements ApiphanyContract { private final WireMockExtension wiremock = WireMockExtension.newInstance() .options(options() + .bindAddress("127.0.0.1") .dynamicHttpsPort() .keystorePath( Tests.resourcePath(ApiClientWithDefaultClientSecurityIT.class, "/security/ssl/server-keystore.jks").toString())