Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip ReactorIntegration on Reactor 3.3.x since it got a built-in one #29

Merged
merged 1 commit into from
May 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions agent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ task relocateShadowJar(type: com.github.jengelman.gradle.plugins.shadow.tasks.Co

tasks.shadowJar.dependsOn tasks.relocateShadowJar

repositories {
jcenter()
}

dependencies {
compileOnly 'com.google.auto.service:auto-service:1.0-rc4'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public void applyTo(BlockHound.Builder builder) {
return;
}

try {
// Reactor 3.3.x comes with built-in integration
Class.forName("reactor.core.CorePublisher");
return;
}
catch (ClassNotFoundException ignored) {
}

// `ScheduledThreadPoolExecutor$DelayedWorkQueue.offer` parks the Thread with Unsafe#park.
builder.allowBlockingCallsInside(ScheduledThreadPoolExecutor.class.getName(), "scheduleAtFixedRate");

Expand Down
21 changes: 21 additions & 0 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id "java"
}

repositories {
maven { url 'https://repo.spring.io/libs-snapshot' }
}

test {
dependsOn(tasks.getByPath(":agent:shadowJar"))
Expand All @@ -16,11 +19,29 @@ test {
jvmArgs = ["-Xverify:all"]
}

configurations {
reactor_3_3_x {
extendsFrom(testCompile, testRuntime)
}
}

task testReactor3_3_x(type: Test) {
group = 'verification'

testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.output.classesDirs + configurations.reactor_3_3_x

include 'com/example/ReactorTest**'
}
check.dependsOn(testReactor3_3_x)

dependencies {
testCompile project(path: ":agent", configuration: 'shadow')
testCompile 'io.projectreactor:reactor-core:3.2.2.RELEASE'
testCompile 'io.reactivex.rxjava2:rxjava:2.2.5'

testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:3.11.1'

reactor_3_3_x 'io.projectreactor:reactor-core:3.3.0.BUILD-SNAPSHOT'
}