Skip to content

Commit d0bfc5b

Browse files
authored
Convert vaadin tests to java (#7444)
Part of #7195 Resolves #7417 Vaadin tests often break with a new version of vaadin. To improve this tests were change to assert only the traces and spans that are common in all the versions.
1 parent 0a045e3 commit d0bfc5b

File tree

19 files changed

+440
-559
lines changed

19 files changed

+440
-559
lines changed

instrumentation/grails-3.0/javaagent/src/test/java/test/GrailsTest.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected void stopServer(ConfigurableApplicationContext ctx) {
5353

5454
@Override
5555
protected void configure(HttpServerTestOptions options) {
56-
options.setContextPath(getContextPath());
56+
options.setContextPath("/xyz");
5757
options.setHasHandlerSpan(unused -> true);
5858
options.setHasResponseSpan(
5959
endpoint -> endpoint == REDIRECT || endpoint == ERROR || endpoint == NOT_FOUND);
@@ -101,10 +101,6 @@ private static Class<?> load(String name) {
101101
}
102102
}
103103

104-
private static String getContextPath() {
105-
return "/xyz";
106-
}
107-
108104
@Override
109105
public String expectedHttpRoute(ServerEndpoint endpoint) {
110106
switch (endpoint) {

instrumentation/vaadin-14.2/javaagent/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ muzzle {
2222
pass {
2323
group.set("com.vaadin")
2424
module.set("flow-server")
25-
versions.set("[3.1.0,23.3.0)")
25+
versions.set("[3.1.0,)")
2626
}
2727
}
2828

@@ -68,7 +68,7 @@ dependencies {
6868
testInstrumentation(project(":instrumentation:tomcat:tomcat-7.0:javaagent"))
6969

7070
add("vaadin14LatestTestImplementation", "com.vaadin:vaadin-spring-boot-starter:14.+")
71-
add("latestDepTestImplementation", "com.vaadin:vaadin-spring-boot-starter:23.2.+")
71+
add("latestDepTestImplementation", "com.vaadin:vaadin-spring-boot-starter:+")
7272
}
7373

7474
configurations {

instrumentation/vaadin-14.2/javaagent/src/vaadin142Test/groovy/test/vaadin/Vaadin142Test.groovy

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package io.opentelemetry.javaagent.instrumentation.vaadin;
7+
8+
public class Vaadin142Test extends AbstractVaadin14Test {}

instrumentation/vaadin-14.2/javaagent/src/vaadin14LatestTest/groovy/test/vaadin/Vaadin14LatestTest.groovy

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package test.io.opentelemetry.javaagent.instrumentation.vaadin;
7+
8+
import io.opentelemetry.javaagent.instrumentation.vaadin.AbstractVaadin14Test;
9+
10+
public class Vaadin14LatestTest extends AbstractVaadin14Test {}

instrumentation/vaadin-14.2/javaagent/src/vaadin16Test/groovy/test/vaadin/Vaadin16Test.groovy

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package io.opentelemetry.javaagent.instrumentation.vaadin;
7+
8+
public class Vaadin16Test extends AbstractVaadin16Test {}

instrumentation/vaadin-14.2/javaagent/src/vaadinLatestTest/groovy/test/vaadin/VaadinLatestTest.groovy

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package io.opentelemetry.javaagent.instrumentation.vaadin;
7+
8+
public class VaadinLatestTest extends AbstractVaadin16Test {}

instrumentation/vaadin-14.2/testing/src/main/groovy/test/vaadin/AbstractVaadin14Test.groovy

-91
This file was deleted.

instrumentation/vaadin-14.2/testing/src/main/groovy/test/vaadin/AbstractVaadin16Test.groovy

-181
This file was deleted.

0 commit comments

Comments
 (0)