From dfa4be5d3edfffd969c9fb24f3cfd85bcb76e9a0 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Thu, 9 Nov 2023 18:28:54 +0100 Subject: [PATCH] Disables the OpenTracing TCK --- tcks/microprofile-opentracing/base/pom.xml | 116 ------------------ .../tck/opentracing/ArquillianExtension.java | 15 --- .../tck/opentracing/DeploymentProcessor.java | 33 ----- .../tck/opentracing/ExceptionMapper.java | 20 --- .../tck/opentracing/MockTracerProducer.java | 29 ----- ...esteasyClientTracingRegistrarProvider.java | 29 ----- ...boss.arquillian.core.spi.LoadableExtension | 1 - .../base/src/test/resources/tck-suite.xml | 9 -- tcks/microprofile-opentracing/pom.xml | 25 ---- .../rest-client/pom.xml | 53 -------- ...boss.arquillian.core.spi.LoadableExtension | 1 - tcks/pom.xml | 1 - 12 files changed, 332 deletions(-) delete mode 100644 tcks/microprofile-opentracing/base/pom.xml delete mode 100644 tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ArquillianExtension.java delete mode 100644 tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/DeploymentProcessor.java delete mode 100644 tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ExceptionMapper.java delete mode 100644 tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/MockTracerProducer.java delete mode 100644 tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ResteasyClientTracingRegistrarProvider.java delete mode 100644 tcks/microprofile-opentracing/base/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension delete mode 100644 tcks/microprofile-opentracing/base/src/test/resources/tck-suite.xml delete mode 100644 tcks/microprofile-opentracing/pom.xml delete mode 100644 tcks/microprofile-opentracing/rest-client/pom.xml delete mode 100644 tcks/microprofile-opentracing/rest-client/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension diff --git a/tcks/microprofile-opentracing/base/pom.xml b/tcks/microprofile-opentracing/base/pom.xml deleted file mode 100644 index 5feebe69a0187..0000000000000 --- a/tcks/microprofile-opentracing/base/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - quarkus-tck-microprofile-opentracing - io.quarkus - 999-SNAPSHOT - - 4.0.0 - - - quarkus-tck-microprofile-opentracing-base - Quarkus - TCK - MicroProfile OpenTracing - Base - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${project.basedir}/src/test/resources/tck-suite.xml - - - - true - - false - - - - - org.eclipse.microprofile.opentracing:microprofile-opentracing-tck - - - - - - - - - io.quarkus - quarkus-arquillian - - - io.quarkus - quarkus-smallrye-opentracing - - - io.quarkus - quarkus-resteasy-jsonb - - - io.opentracing - opentracing-mock - - - io.quarkus - quarkus-rest-client - - - org.eclipse.microprofile.opentracing - microprofile-opentracing-tck - ${microprofile-opentracing-tck.version} - - - org.sonatype.plexus - * - - - - - - - io.quarkus - quarkus-rest-client-deployment - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-resteasy-jsonb-deployment - ${project.version} - pom - test - - - * - * - - - - - io.quarkus - quarkus-smallrye-opentracing-deployment - ${project.version} - pom - test - - - * - * - - - - - diff --git a/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ArquillianExtension.java b/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ArquillianExtension.java deleted file mode 100644 index ff408ac9ddf88..0000000000000 --- a/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ArquillianExtension.java +++ /dev/null @@ -1,15 +0,0 @@ -package io.quarkus.tck.opentracing; - -import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; -import org.jboss.arquillian.core.spi.LoadableExtension; - -/** - * @author Pavol Loffay - */ -public class ArquillianExtension implements LoadableExtension { - - @Override - public void register(ExtensionBuilder extensionBuilder) { - extensionBuilder.service(ApplicationArchiveProcessor.class, DeploymentProcessor.class); - } -} diff --git a/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/DeploymentProcessor.java b/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/DeploymentProcessor.java deleted file mode 100644 index cde0c3eebd767..0000000000000 --- a/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/DeploymentProcessor.java +++ /dev/null @@ -1,33 +0,0 @@ -package io.quarkus.tck.opentracing; - -import org.eclipse.microprofile.opentracing.ClientTracingRegistrarProvider; -import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; -import org.jboss.arquillian.test.spi.TestClass; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.spec.WebArchive; - -/** - * @author Pavol Loffay - * @author Jan Martiska - */ -public class DeploymentProcessor implements ApplicationArchiveProcessor { - - @Override - public void process(Archive archive, TestClass testClass) { - if (archive instanceof WebArchive) { - WebArchive war = WebArchive.class.cast(archive); - - // enable tracing on the client side - war.addAsServiceProvider(ClientTracingRegistrarProvider.class, - ResteasyClientTracingRegistrarProvider.class); - war.addClasses(ResteasyClientTracingRegistrarProvider.class); - - // override the default TracerProducer - war.addClass(MockTracerProducer.class); - - // workaround for RESTEASY-1758 - war.addClass(ExceptionMapper.class); - } - - } -} diff --git a/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ExceptionMapper.java b/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ExceptionMapper.java deleted file mode 100644 index aecc605891e1d..0000000000000 --- a/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ExceptionMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package io.quarkus.tck.opentracing; - -import jakarta.ws.rs.core.Response; -import jakarta.ws.rs.core.Response.Status; -import jakarta.ws.rs.ext.Provider; - -/** - * Temporary fix to catch exceptions thrown in JAX-RS endpoints - * See https://issues.jboss.org/browse/RESTEASY-1758 - * - * @author Pavol Loffay - */ -@Provider -public class ExceptionMapper implements jakarta.ws.rs.ext.ExceptionMapper { - - @Override - public Response toResponse(RuntimeException exception) { - return Response.status(Status.INTERNAL_SERVER_ERROR).build(); - } -} diff --git a/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/MockTracerProducer.java b/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/MockTracerProducer.java deleted file mode 100644 index 37b2718d1acf9..0000000000000 --- a/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/MockTracerProducer.java +++ /dev/null @@ -1,29 +0,0 @@ -package io.quarkus.tck.opentracing; - -import jakarta.annotation.Priority; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.Alternative; -import jakarta.enterprise.inject.Default; -import jakarta.enterprise.inject.Produces; -import jakarta.inject.Singleton; -import jakarta.interceptor.Interceptor; - -import io.opentracing.Tracer; -import io.opentracing.mock.MockTracer; - -/** - * @author Pavol Loffay - * @author Jan Martiska - */ -@ApplicationScoped -@Alternative // this needs to override io.quarkus.smallrye.opentracing.runtime.TracerProducer -@Priority(Interceptor.Priority.APPLICATION + 10) -public class MockTracerProducer { - - @Default - @Produces - @Singleton - public Tracer tracer() { - return new MockTracer(); - } -} diff --git a/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ResteasyClientTracingRegistrarProvider.java b/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ResteasyClientTracingRegistrarProvider.java deleted file mode 100644 index 6ea23bcf766a5..0000000000000 --- a/tcks/microprofile-opentracing/base/src/main/java/io/quarkus/tck/opentracing/ResteasyClientTracingRegistrarProvider.java +++ /dev/null @@ -1,29 +0,0 @@ - -package io.quarkus.tck.opentracing; - -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import jakarta.enterprise.inject.spi.CDI; -import jakarta.ws.rs.client.ClientBuilder; - -import org.eclipse.microprofile.opentracing.ClientTracingRegistrarProvider; -import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; - -import io.opentracing.Tracer; -import io.opentracing.contrib.concurrent.TracedExecutorService; -import io.smallrye.opentracing.SmallRyeClientTracingFeature; - -public class ResteasyClientTracingRegistrarProvider implements ClientTracingRegistrarProvider { - - public ClientBuilder configure(ClientBuilder clientBuilder) { - return configure(clientBuilder, Executors.newFixedThreadPool(10)); - } - - public ClientBuilder configure(ClientBuilder clientBuilder, ExecutorService executorService) { - ResteasyClientBuilder resteasyClientBuilder = (ResteasyClientBuilder) clientBuilder; - Tracer tracer = CDI.current().select(Tracer.class).get(); - return resteasyClientBuilder.executorService(new TracedExecutorService(executorService, tracer)) - .register(new SmallRyeClientTracingFeature(tracer)); - } -} diff --git a/tcks/microprofile-opentracing/base/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/tcks/microprofile-opentracing/base/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension deleted file mode 100644 index f8bd98c23eba7..0000000000000 --- a/tcks/microprofile-opentracing/base/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension +++ /dev/null @@ -1 +0,0 @@ -io.quarkus.tck.opentracing.ArquillianExtension \ No newline at end of file diff --git a/tcks/microprofile-opentracing/base/src/test/resources/tck-suite.xml b/tcks/microprofile-opentracing/base/src/test/resources/tck-suite.xml deleted file mode 100644 index 5cea1722f53b7..0000000000000 --- a/tcks/microprofile-opentracing/base/src/test/resources/tck-suite.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/tcks/microprofile-opentracing/pom.xml b/tcks/microprofile-opentracing/pom.xml deleted file mode 100644 index 9dc3eae41b770..0000000000000 --- a/tcks/microprofile-opentracing/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - quarkus-tck-parent - io.quarkus - 999-SNAPSHOT - ../pom.xml - - 4.0.0 - - quarkus-tck-microprofile-opentracing - pom - Quarkus - TCK - MicroProfile OpenTracing Parent - - - 3.0 - - - - base - rest-client - - - diff --git a/tcks/microprofile-opentracing/rest-client/pom.xml b/tcks/microprofile-opentracing/rest-client/pom.xml deleted file mode 100644 index 21455c3a85cae..0000000000000 --- a/tcks/microprofile-opentracing/rest-client/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - quarkus-tck-microprofile-opentracing - io.quarkus - 999-SNAPSHOT - - 4.0.0 - - - quarkus-tck-microprofile-opentracing-rest-client - Quarkus - TCK - MicroProfile OpenTracing - REST Client - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - true - - false - - - - - org.eclipse.microprofile.opentracing:microprofile-opentracing-tck-rest-client - - - - - - - - - - io.quarkus - quarkus-tck-microprofile-opentracing-base - ${project.version} - - - org.eclipse.microprofile.opentracing - microprofile-opentracing-tck-rest-client - ${microprofile-opentracing-tck.version} - - - - diff --git a/tcks/microprofile-opentracing/rest-client/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/tcks/microprofile-opentracing/rest-client/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension deleted file mode 100644 index f8bd98c23eba7..0000000000000 --- a/tcks/microprofile-opentracing/rest-client/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension +++ /dev/null @@ -1 +0,0 @@ -io.quarkus.tck.opentracing.ArquillianExtension \ No newline at end of file diff --git a/tcks/pom.xml b/tcks/pom.xml index d6ffca4d59489..d3d471d05ea48 100644 --- a/tcks/pom.xml +++ b/tcks/pom.xml @@ -110,7 +110,6 @@ microprofile-rest-client microprofile-rest-client-reactive microprofile-openapi - microprofile-opentracing microprofile-opentelemetry microprofile-lra resteasy-reactive