This is an automated email from the ASF dual-hosted git repository.
fcsaky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-http.git
The following commit(s) were added to refs/heads/main by this push:
new cf542d7 [FLINK-39087] Upgrade wiremock
cf542d7 is described below
commit cf542d717b90733cc6a607be9d495e9fc53e2975
Author: David Radley <[email protected]>
AuthorDate: Mon Feb 16 15:24:54 2026 +0000
[FLINK-39087] Upgrade wiremock
---
flink-connector-http/pom.xml | 17 +++++++++--
.../lookup/HttpLookupTableSourceITCaseTest.java | 35 ++++++++--------------
pom.xml | 16 ++++++++--
3 files changed, 42 insertions(+), 26 deletions(-)
diff --git a/flink-connector-http/pom.xml b/flink-connector-http/pom.xml
index 2951cc0..619fb17 100644
--- a/flink-connector-http/pom.xml
+++ b/flink-connector-http/pom.xml
@@ -306,12 +306,24 @@ under the License.
</dependency>
<dependency>
- <groupId>com.github.tomakehurst</groupId>
+ <groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
- <version>${wiremock.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>net.javacrumbs.json-unit</groupId>
+ <artifactId>json-unit-core</artifactId>
+ <version>2.40.1</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
<dependency>
<groupId> com.google.guava</groupId>
<artifactId>guava</artifactId>
@@ -421,6 +433,7 @@ under the License.
<ignoredDependency>net.bytebuddy:byte-buddy:jar:1.14.17</ignoredDependency>
<ignoredDependency>com.google.guava:guava:jar:32.0.1-jre</ignoredDependency>
<ignoredDependency>org.apache.flink:flink-clients:jar:1.20.0</ignoredDependency>
+
<ignoredDependency>net.javacrumbs.json-unit:json-unit-core:jar:2.40.1</ignoredDependency>
<ignoredUnusedDeclaredDependencies>org.apache.flink:flink-table-planner_${scala.binary.version}
</ignoredUnusedDeclaredDependencies>
<ignoredDependency>org.apache.flink:flink-table-test-utils:jar:1.20.0</ignoredDependency>
diff --git
a/flink-connector-http/src/test/java/org/apache/flink/connector/http/table/lookup/HttpLookupTableSourceITCaseTest.java
b/flink-connector-http/src/test/java/org/apache/flink/connector/http/table/lookup/HttpLookupTableSourceITCaseTest.java
index 776d21e..88e8e66 100644
---
a/flink-connector-http/src/test/java/org/apache/flink/connector/http/table/lookup/HttpLookupTableSourceITCaseTest.java
+++
b/flink-connector-http/src/test/java/org/apache/flink/connector/http/table/lookup/HttpLookupTableSourceITCaseTest.java
@@ -41,7 +41,6 @@ import com.github.tomakehurst.wiremock.client.MappingBuilder;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.matching.StringValuePattern;
import com.github.tomakehurst.wiremock.stubbing.Scenario;
-import com.github.tomakehurst.wiremock.stubbing.StubMapping;
import lombok.Builder;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@@ -1210,27 +1209,21 @@ class HttpLookupTableSourceITCaseTest {
}
private void setupServerStub(WireMockServer wireMockServer) {
- StubMapping stubMapping =
- wireMockServer.stubFor(
- get(urlPathEqualTo(ENDPOINT))
- .withHeader("Content-Type",
equalTo("application/json"))
- .withQueryParam("id", matching("[0-9]+"))
- .withQueryParam("id2", matching("[0-9]+"))
-
.willReturn(aResponse().withTransformers(JsonTransform.NAME)));
-
- wireMockServer.addStubMapping(stubMapping);
+ wireMockServer.stubFor(
+ get(urlPathEqualTo(ENDPOINT))
+ .withHeader("Content-Type",
equalTo("application/json"))
+ .withQueryParam("id", matching("[0-9]+"))
+ .withQueryParam("id2", matching("[0-9]+"))
+
.willReturn(aResponse().withTransformers(JsonTransform.NAME)));
}
private void setupServerStubEmptyResponse(WireMockServer wireMockServer) {
- StubMapping stubMapping =
- wireMockServer.stubFor(
- get(urlPathEqualTo(ENDPOINT))
- .withHeader("Content-Type",
equalTo("application/json"))
- .withQueryParam("id", matching("[0-9]+"))
- .withQueryParam("id2", matching("[0-9]+"))
- .willReturn(aResponse().withBody(new
byte[0])));
-
- wireMockServer.addStubMapping(stubMapping);
+ wireMockServer.stubFor(
+ get(urlPathEqualTo(ENDPOINT))
+ .withHeader("Content-Type",
equalTo("application/json"))
+ .withQueryParam("id", matching("[0-9]+"))
+ .withQueryParam("id2", matching("[0-9]+"))
+ .willReturn(aResponse().withBody(new byte[0])));
}
private void setUpServerBodyStub(
@@ -1305,9 +1298,7 @@ class HttpLookupTableSourceITCaseTest {
.withHeader("Content-Type", "text/plain"));
}
- StubMapping stubMapping = wireMockServer.stubFor(methodStub);
-
- wireMockServer.addStubMapping(stubMapping);
+ wireMockServer.stubFor(methodStub);
}
// Prototype parameterizedTest
diff --git a/pom.xml b/pom.xml
index 9ab7ef5..8ecc251 100644
--- a/pom.xml
+++ b/pom.xml
@@ -83,7 +83,7 @@ under the License.
<mockito-inline.version>5.2.0</mockito-inline.version>
<!-- explicitly include a java 21 supporting version of byte buddy -->
<bytebuddy.version>1.14.17</bytebuddy.version>
- <wiremock.version>2.27.2</wiremock.version>
+ <wiremock.version>3.13.2</wiremock.version>
<maven.shade.plugin.version>3.1.1</maven.shade.plugin.version>
<resilence4j.version>1.7.1</resilence4j.version>
<japicmp.skip>false</japicmp.skip>
@@ -413,7 +413,7 @@ under the License.
</dependency>
<dependency>
- <groupId>com.github.tomakehurst</groupId>
+ <groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<version>${wiremock.version}</version>
<!--exclusion required to pass convergence check in CI -->
@@ -446,6 +446,18 @@ under the License.
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.javacrumbs.json-unit</groupId>
+ <artifactId>json-unit-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.networknt</groupId>
+ <artifactId>json-schema-validator</artifactId>
+ </exclusion>
</exclusions>
</dependency>