feat: find oldest supported spark, update version, make tests run
This commit is contained in:
parent
8b289c7036
commit
7e233ac3c7
|
@ -3,7 +3,7 @@ apply plugin: 'version-scan'
|
|||
versionScan {
|
||||
group = "org.eclipse.jetty.server"
|
||||
module = 'org.eclipse.jetty.server-Handler'
|
||||
versions = "[3.0,)"
|
||||
versions = "[8.0.0.v20110901,)"
|
||||
verifyPresent = [
|
||||
"javax.servlet.AsyncEvent" : null,
|
||||
"javax.servlet.AsyncListener": null,
|
||||
|
|
|
@ -2,8 +2,8 @@ apply plugin: 'version-scan'
|
|||
|
||||
versionScan {
|
||||
group = "spark"
|
||||
module = 'spark.routes-Routes'
|
||||
versions = "[3.0,)"
|
||||
module = 'spark'
|
||||
versions = "[2.3,)"
|
||||
verifyPresent = [
|
||||
"spark.embeddedserver.jetty.EmbeddedJettyServer" : null
|
||||
]
|
||||
|
@ -18,6 +18,9 @@ if (JavaVersion.current().isJava8Compatible()) {
|
|||
// Sparkjava is not compatible with < Java 8
|
||||
exclude '**/SparkJavaBasedTest.groovy'
|
||||
}
|
||||
java {
|
||||
exclude '**/TestSparkJavaApplication.java'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +31,7 @@ dependencies {
|
|||
compile deps.bytebuddy
|
||||
compile deps.opentracing
|
||||
compile deps.autoservice
|
||||
compile group: 'com.sparkjava', name: 'spark-core', version: '2.5'
|
||||
compile group: 'com.sparkjava', name: 'spark-core', version: '2.3'
|
||||
|
||||
testCompile project(':dd-java-agent:instrumentation:jetty-8')
|
||||
testCompile project(':dd-java-agent:testing')
|
|
@ -16,7 +16,7 @@ import spark.routematch.RouteMatch;
|
|||
public class RoutesInstrumentation extends Instrumenter.Configurable {
|
||||
|
||||
public RoutesInstrumentation() {
|
||||
super("sparkjava", "sparkjava-2");
|
||||
super("sparkjava", "sparkjava-2.3");
|
||||
}
|
||||
|
||||
@Override
|
|
@ -0,0 +1,17 @@
|
|||
import spark.Spark;
|
||||
|
||||
public class TestSparkJavaApplication {
|
||||
|
||||
public static void main(final String[] args) {
|
||||
|
||||
Spark.get("/", (req, res) -> "Hello World");
|
||||
|
||||
Spark.get("/param/:param", (req, res) -> "Hello " + req.params("param"));
|
||||
|
||||
Spark.get(
|
||||
"/exception/:param",
|
||||
(req, res) -> {
|
||||
throw new RuntimeException(req.params("param"));
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
import spark.Request;
|
||||
import spark.Response;
|
||||
import spark.Route;
|
||||
import spark.Spark;
|
||||
|
||||
public class TestSparkJavaApplication {
|
||||
|
||||
public static void main(final String[] args) {
|
||||
|
||||
Spark.get(
|
||||
"/",
|
||||
new Route() {
|
||||
@Override
|
||||
public Object handle(Request request, Response response) throws Exception {
|
||||
return "Hello World";
|
||||
}
|
||||
});
|
||||
|
||||
Spark.get(
|
||||
"/param/:param",
|
||||
new Route() {
|
||||
@Override
|
||||
public Object handle(Request request, Response response) throws Exception {
|
||||
return "Hello " + request.params("param");
|
||||
}
|
||||
});
|
||||
|
||||
Spark.get(
|
||||
"/exception/:param",
|
||||
new Route() {
|
||||
@Override
|
||||
public Object handle(Request request, Response response) throws Exception {
|
||||
throw new RuntimeException(request.params("param"));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -35,7 +35,7 @@ include ':dd-java-agent:instrumentation:play-2.4:play-2.6-testing'
|
|||
include ':dd-java-agent:instrumentation:ratpack-1.4'
|
||||
include ':dd-java-agent:instrumentation:servlet-2'
|
||||
include ':dd-java-agent:instrumentation:servlet-3'
|
||||
include ':dd-java-agent:instrumentation:sparkjava-2.5'
|
||||
include ':dd-java-agent:instrumentation:sparkjava-2.3'
|
||||
include ':dd-java-agent:instrumentation:spring-web'
|
||||
include ':dd-java-agent:instrumentation:trace-annotation'
|
||||
|
||||
|
|
Loading…
Reference in New Issue