From ae3961410c92991bc7023ab05564c3d5c21e5dbe Mon Sep 17 00:00:00 2001 From: Roberto Cortez Date: Wed, 19 Jul 2023 20:02:05 +0100 Subject: [PATCH] Use Quarkus path in Arquillian Servlet --- .../io/quarkus/arquillian/QuarkusDeployableContainer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test-framework/arquillian/src/main/java/io/quarkus/arquillian/QuarkusDeployableContainer.java b/test-framework/arquillian/src/main/java/io/quarkus/arquillian/QuarkusDeployableContainer.java index 4f41a5dd06c35..4faea87209e3e 100644 --- a/test-framework/arquillian/src/main/java/io/quarkus/arquillian/QuarkusDeployableContainer.java +++ b/test-framework/arquillian/src/main/java/io/quarkus/arquillian/QuarkusDeployableContainer.java @@ -242,7 +242,11 @@ public void execute(BuildContext context) { URI uri = URI.create(testUri); HTTPContext httpContext = new HTTPContext(uri.getHost(), uri.getPort()); // This is to work around https://github.com/arquillian/arquillian-core/issues/216 - httpContext.add(new Servlet("dummy", "/")); + String path = uri.getPath(); + if (path == null || path.isEmpty()) { + path = "/"; + } + httpContext.add(new Servlet("dummy", path)); metadata.addContext(httpContext); return metadata; }