Skip to content

Commit

Permalink
Convert vaadin tests to java (#7444)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
laurit authored Jan 3, 2023
1 parent 0a045e3 commit d0bfc5b
Show file tree
Hide file tree
Showing 19 changed files with 440 additions and 559 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected void stopServer(ConfigurableApplicationContext ctx) {

@Override
protected void configure(HttpServerTestOptions options) {
options.setContextPath(getContextPath());
options.setContextPath("/xyz");
options.setHasHandlerSpan(unused -> true);
options.setHasResponseSpan(
endpoint -> endpoint == REDIRECT || endpoint == ERROR || endpoint == NOT_FOUND);
Expand Down Expand Up @@ -101,10 +101,6 @@ private static Class<?> load(String name) {
}
}

private static String getContextPath() {
return "/xyz";
}

@Override
public String expectedHttpRoute(ServerEndpoint endpoint) {
switch (endpoint) {
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/vaadin-14.2/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ muzzle {
pass {
group.set("com.vaadin")
module.set("flow-server")
versions.set("[3.1.0,23.3.0)")
versions.set("[3.1.0,)")
}
}

Expand Down Expand Up @@ -68,7 +68,7 @@ dependencies {
testInstrumentation(project(":instrumentation:tomcat:tomcat-7.0:javaagent"))

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

configurations {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.javaagent.instrumentation.vaadin;

public class Vaadin142Test extends AbstractVaadin14Test {}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package test.io.opentelemetry.javaagent.instrumentation.vaadin;

import io.opentelemetry.javaagent.instrumentation.vaadin.AbstractVaadin14Test;

public class Vaadin14LatestTest extends AbstractVaadin14Test {}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.javaagent.instrumentation.vaadin;

public class Vaadin16Test extends AbstractVaadin16Test {}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.javaagent.instrumentation.vaadin;

public class VaadinLatestTest extends AbstractVaadin16Test {}

This file was deleted.

This file was deleted.

Loading

0 comments on commit d0bfc5b

Please sign in to comment.