mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-22 03:52:10 +00:00
Fix Blockhound setup for Elasticsearch 7.16, dependency version updates.
Original Pull Request #2038
This commit is contained in:
parent
4835df7958
commit
170648d467
9
pom.xml
9
pom.xml
@ -23,7 +23,7 @@
|
|||||||
<log4j>2.17.0</log4j>
|
<log4j>2.17.0</log4j>
|
||||||
<netty>4.1.65.Final</netty>
|
<netty>4.1.65.Final</netty>
|
||||||
<springdata.commons>2.7.0-SNAPSHOT</springdata.commons>
|
<springdata.commons>2.7.0-SNAPSHOT</springdata.commons>
|
||||||
<testcontainers>1.15.3</testcontainers>
|
<testcontainers>1.16.2</testcontainers>
|
||||||
<blockhound-junit>1.0.6.RELEASE</blockhound-junit>
|
<blockhound-junit>1.0.6.RELEASE</blockhound-junit>
|
||||||
<java-module-name>spring.data.elasticsearch</java-module-name>
|
<java-module-name>spring.data.elasticsearch</java-module-name>
|
||||||
|
|
||||||
@ -163,7 +163,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
<artifactId>geronimo-jcdi_2.0_spec</artifactId>
|
<artifactId>geronimo-jcdi_2.0_spec</artifactId>
|
||||||
<version>1.0.1</version>
|
<version>1.3</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -229,6 +229,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
|
<!--suppress MavenPackageUpdate -->
|
||||||
<version>999999</version>
|
<version>999999</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@ -243,7 +244,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.tomakehurst</groupId>
|
<groupId>com.github.tomakehurst</groupId>
|
||||||
<artifactId>wiremock-jre8</artifactId>
|
<artifactId>wiremock-jre8</artifactId>
|
||||||
<version>2.26.3</version>
|
<version>2.32.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<!-- these exclusions are needed because of Elasticsearch JarHell-->
|
<!-- these exclusions are needed because of Elasticsearch JarHell-->
|
||||||
@ -261,7 +262,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.specto</groupId>
|
<groupId>io.specto</groupId>
|
||||||
<artifactId>hoverfly-java-junit5</artifactId>
|
<artifactId>hoverfly-java-junit5</artifactId>
|
||||||
<version>0.13.1</version>
|
<version>0.14.1</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -27,10 +27,14 @@ public class BlockHoundIntegrationCustomizer implements BlockHoundIntegration {
|
|||||||
@Override
|
@Override
|
||||||
public void applyTo(BlockHound.Builder builder) {
|
public void applyTo(BlockHound.Builder builder) {
|
||||||
// Elasticsearch classes reading from the classpath on initialization, needed for parsing Elasticsearch responses
|
// Elasticsearch classes reading from the classpath on initialization, needed for parsing Elasticsearch responses
|
||||||
builder.allowBlockingCallsInside("org.elasticsearch.common.xcontent.XContentBuilder", "<clinit>")
|
builder //
|
||||||
|
.allowBlockingCallsInside("org.elasticsearch.common.xcontent.XContentBuilder", "<clinit>") // pre 7.16
|
||||||
|
.allowBlockingCallsInside("org.elasticsearch.common.XContentBuilder", "<clinit>") // from 7.16 on
|
||||||
|
.allowBlockingCallsInside("org.elasticsearch.xcontent.json.JsonXContent", "contentBuilder") // from 7.16 on
|
||||||
.allowBlockingCallsInside("org.elasticsearch.Build", "<clinit>");
|
.allowBlockingCallsInside("org.elasticsearch.Build", "<clinit>");
|
||||||
|
|
||||||
builder.blockingMethodCallback(it -> {
|
builder.blockingMethodCallback(it -> {
|
||||||
|
new Error(it.toString()).printStackTrace();
|
||||||
throw new BlockingOperationError(it);
|
throw new BlockingOperationError(it);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user