ResteasyHttpServerTest.groovy 834 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. import io.undertow.Undertow
  6. import org.jboss.resteasy.plugins.server.undertow.UndertowJaxrsServer
  7. import test.JaxRsTestApplication
  8. class ResteasyHttpServerTest extends JaxRsHttpServerTest<UndertowJaxrsServer> {
  9. @Override
  10. String getContextPath() {
  11. "/resteasy-context"
  12. }
  13. @Override
  14. UndertowJaxrsServer startServer(int port) {
  15. def server = new UndertowJaxrsServer()
  16. server.deploy(JaxRsTestApplication, getContextPath())
  17. server.start(Undertow.builder()
  18. .addHttpListener(port, "localhost"))
  19. return server
  20. }
  21. @Override
  22. void stopServer(UndertowJaxrsServer server) {
  23. server.stop()
  24. }
  25. // resteasy 3.0.x does not support JAX-RS 2.1
  26. @Override
  27. boolean shouldTestCompletableStageAsync() {
  28. false
  29. }
  30. }