Skip to content

Commit 3504cef

Browse files
authored
Adjust Cassandra Driver muzzle tests (#10124)
* fix: Cassandra muzzle tests * chore: Remove muzzle directive name
1 parent 71d8da3 commit 3504cef

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

dd-java-agent/instrumentation/datastax-cassandra/datastax-cassandra-3.0/build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
ext {
2-
cassandraDriverTestVersions = "[3.0,4.0)"
3-
}
4-
51
muzzle {
62
pass {
73
group = "com.datastax.cassandra"
84
module = "cassandra-driver-core"
9-
versions = cassandraDriverTestVersions
10-
assertInverse = true
5+
versions = "[3.0,4)"
116
// Older versions of cassandra-driver-core require an older guava dependency (0.16.0). guava >20.0 is not
127
// compatible with Java 7, so we declare the dependency on 20.0 in our top level dependencies.gradle.
138
// Ideally our muzzle plugin should take into account those versions declaration, instead it does not so we would
@@ -17,16 +12,23 @@ muzzle {
1712
extraDependency "com.google.guava:guava:20.0"
1813
}
1914

15+
fail {
16+
group = "com.datastax.cassandra"
17+
module = "cassandra-driver-core"
18+
versions = "[0.0,3.0)"
19+
}
20+
2021
// Making sure that instrumentation works with recent versions of Guava which removed method
2122
// Futures::transform(input, function) in favor of Futures::transform(input, function, executor)
2223
pass {
2324
name = "Newest versions of Guava"
2425
group = "com.datastax.cassandra"
2526
module = "cassandra-driver-core"
26-
versions = cassandraDriverTestVersions
27+
versions = "[3.0,4)"
2728
// While com.datastax.cassandra uses old versions of Guava, users may depends themselves on newer versions of Guava
2829
extraDependency "com.google.guava:guava:27.0-jre"
2930
}
31+
3032
pass {
3133
name = "cluster"
3234
group = "com.datastax.cassandra"

dd-java-agent/instrumentation/datastax-cassandra/datastax-cassandra-3.8/build.gradle

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
ext {
2-
cassandraDriverTestVersions = "[3.8,4.0)"
3-
}
4-
51
muzzle {
62
pass {
73
group = "com.datastax.cassandra"
84
module = "cassandra-driver-core"
9-
versions = cassandraDriverTestVersions
10-
assertInverse = true
5+
versions = "[3.8,4.0)"
116
extraDependency "com.google.guava:guava:27.0-jre"
127
}
8+
9+
fail {
10+
name = "pre-3.8 versions"
11+
group = "com.datastax.cassandra"
12+
module = "cassandra-driver-core"
13+
versions = "[0.0,3.8)"
14+
}
1315
}
1416

1517
apply from: "$rootDir/gradle/java.gradle"

0 commit comments

Comments
 (0)