diff --git a/instrumentation/gwt-2.0/javaagent/build.gradle.kts b/instrumentation/gwt-2.0/javaagent/build.gradle.kts index babb8cbdb1..a91686e121 100644 --- a/instrumentation/gwt-2.0/javaagent/build.gradle.kts +++ b/instrumentation/gwt-2.0/javaagent/build.gradle.kts @@ -91,10 +91,6 @@ tasks { } named("test") { - // TODO(anuraaga): Reenable after fixing - // https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/3724 - enabled = gradle.startParameter.taskNames.any { it.contains(":gwt-2.0") } - dependsOn(sourceSets["testapp"].output) dependsOn(copyTestWebapp) diff --git a/instrumentation/gwt-2.0/javaagent/src/test/groovy/GwtTest.groovy b/instrumentation/gwt-2.0/javaagent/src/test/groovy/GwtTest.groovy index fce27cc335..db274a0328 100644 --- a/instrumentation/gwt-2.0/javaagent/src/test/groovy/GwtTest.groovy +++ b/instrumentation/gwt-2.0/javaagent/src/test/groovy/GwtTest.groovy @@ -12,7 +12,7 @@ import java.util.concurrent.TimeUnit import org.eclipse.jetty.server.Server import org.eclipse.jetty.util.resource.Resource import org.eclipse.jetty.webapp.WebAppContext -import org.openqa.selenium.chrome.ChromeOptions +import org.openqa.selenium.firefox.FirefoxOptions import org.slf4j.Logger import org.slf4j.LoggerFactory import org.testcontainers.Testcontainers @@ -24,7 +24,7 @@ class GwtTest extends AgentInstrumentationSpecification implements HttpServerTes private static final Logger logger = LoggerFactory.getLogger(GwtTest) @Shared - BrowserWebDriverContainer chrome + BrowserWebDriverContainer browser @Override Server startServer(int port) { @@ -52,16 +52,16 @@ class GwtTest extends AgentInstrumentationSpecification implements HttpServerTes def setupSpec() { Testcontainers.exposeHostPorts(port) - chrome = new BrowserWebDriverContainer<>() - .withCapabilities(new ChromeOptions()) + browser = new BrowserWebDriverContainer<>() + .withCapabilities(new FirefoxOptions()) .withLogConsumer(new Slf4jLogConsumer(logger)) - chrome.start() + browser.start() address = new URI("http://host.testcontainers.internal:$port" + getContextPath() + "/") } def cleanupSpec() { - chrome?.stop() + browser?.stop() } @Override @@ -70,7 +70,7 @@ class GwtTest extends AgentInstrumentationSpecification implements HttpServerTes } def getDriver() { - def driver = chrome.getWebDriver() + def driver = browser.getWebDriver() driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS) return driver } @@ -94,14 +94,14 @@ class GwtTest extends AgentInstrumentationSpecification implements HttpServerTes trace(1, 1) { serverSpan(it, 0, getContextPath() + "/*") } - // /xyz/greeting/1B105441581A8F41E49D5DF3FB5B55BA.cache.html - trace(2, 1) { - serverSpan(it, 0, getContextPath() + "/*") - } // /favicon.ico - trace(3, 1) { + trace(2, 1) { serverSpan(it, 0, "HTTP GET") } + // /xyz/greeting/1B105441581A8F41E49D5DF3FB5B55BA.cache.html + trace(3, 1) { + serverSpan(it, 0, getContextPath() + "/*") + } } clearExportedData() diff --git a/instrumentation/vaadin-14.2/javaagent/build.gradle.kts b/instrumentation/vaadin-14.2/javaagent/build.gradle.kts index 5e07044b57..e6c2eb00d9 100644 --- a/instrumentation/vaadin-14.2/javaagent/build.gradle.kts +++ b/instrumentation/vaadin-14.2/javaagent/build.gradle.kts @@ -41,12 +41,6 @@ tasks { val vaadin16Test by existing val vaadin14LatestTest by existing - withType().configureEach { - // TODO(anuraaga): Reenable after fixing - // https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/3724 - enabled = gradle.startParameter.taskNames.any { it.contains(":vaadin-14.2") } - } - named("test") { dependsOn(vaadin142Test) dependsOn(vaadin16Test) diff --git a/instrumentation/vaadin-14.2/testing/src/main/groovy/test/vaadin/AbstractVaadinTest.groovy b/instrumentation/vaadin-14.2/testing/src/main/groovy/test/vaadin/AbstractVaadinTest.groovy index 60dba944bf..b6f36bec8e 100644 --- a/instrumentation/vaadin-14.2/testing/src/main/groovy/test/vaadin/AbstractVaadinTest.groovy +++ b/instrumentation/vaadin-14.2/testing/src/main/groovy/test/vaadin/AbstractVaadinTest.groovy @@ -12,7 +12,7 @@ import io.opentelemetry.instrumentation.test.AgentInstrumentationSpecification import io.opentelemetry.instrumentation.test.asserts.TraceAssert import io.opentelemetry.instrumentation.test.base.HttpServerTestTrait import java.util.concurrent.TimeUnit -import org.openqa.selenium.chrome.ChromeOptions +import org.openqa.selenium.firefox.FirefoxOptions import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.boot.SpringApplication @@ -27,7 +27,7 @@ abstract class AbstractVaadinTest extends AgentInstrumentationSpecification impl private static final Logger logger = LoggerFactory.getLogger(AbstractVaadinTest) @Shared - BrowserWebDriverContainer chrome + BrowserWebDriverContainer browser @SpringBootApplication @EnableVaadin("test.vaadin") @@ -46,16 +46,16 @@ abstract class AbstractVaadinTest extends AgentInstrumentationSpecification impl def setupSpec() { Testcontainers.exposeHostPorts(port) - chrome = new BrowserWebDriverContainer<>() - .withCapabilities(new ChromeOptions()) + browser = new BrowserWebDriverContainer<>() + .withCapabilities(new FirefoxOptions()) .withLogConsumer(new Slf4jLogConsumer(logger)) - chrome.start() + browser.start() address = new URI("http://host.testcontainers.internal:$port" + getContextPath() + "/") } def cleanupSpec() { - chrome?.stop() + browser?.stop() } @Override @@ -91,7 +91,7 @@ abstract class AbstractVaadinTest extends AgentInstrumentationSpecification impl } def getWebDriver() { - return chrome.getWebDriver() + return browser.getWebDriver() } abstract List getRequestHandlers()