diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/api/rs/ext/interceptor/reader/interceptorcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/api/rs/ext/interceptor/reader/interceptorcontext/JAXRSClientIT.java index 2d8308421..cd7caefb7 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/api/rs/ext/interceptor/reader/interceptorcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/api/rs/ext/interceptor/reader/interceptorcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -50,10 +50,6 @@ public class JAXRSClientIT extends ReaderClient { private static final long serialVersionUID = -8828149277776372718L; - public JAXRSClientIT() { - setup(); - } - @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); @@ -63,6 +59,15 @@ void logStartTest(TestInfo testInfo) { void logFinishTest(TestInfo testInfo) { TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } + + @BeforeEach + public void setup() { + // Only the values are verified, using verifySettings() in JaxrWebTestCase.java + // but the URL with these values is not required to work. + // TODO: remove validation of these values for the tests in this file. + _hostname = "localhost"; + _port = 8080; + } /* * @testName: getAnnotationsTest diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/api/rs/ext/interceptor/reader/readerinterceptorcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/api/rs/ext/interceptor/reader/readerinterceptorcontext/JAXRSClientIT.java index abc638081..fe4688891 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/api/rs/ext/interceptor/reader/readerinterceptorcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/api/rs/ext/interceptor/reader/readerinterceptorcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -38,8 +38,18 @@ public class JAXRSClientIT extends ReaderClient { private static final long serialVersionUID = -6962070973647934636L; - public JAXRSClientIT() { - setup(); + @BeforeEach + public void setup() { + + // Only the values are verified, using verifySettings() in JaxrWebTestCase.java + // but the URL with these values is not required to work. + // TODO: remove validation of these values for the tests in this file. + _hostname = "localhost"; + _port = 8080; + + String property = System.getProperty("cts.tmp", "/tmp"); + if (property != null) + System.setProperty("java.io.tmpdir", property); } @BeforeEach diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/common/JAXRSCommonClient.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/common/JAXRSCommonClient.java index d5c06b142..950814bf1 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/common/JAXRSCommonClient.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/common/JAXRSCommonClient.java @@ -18,6 +18,7 @@ import java.io.*; import java.net.InetAddress; +import java.net.URL; import java.net.UnknownHostException; import java.util.Enumeration; import java.util.Hashtable; @@ -35,6 +36,9 @@ import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.HttpState; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; +import org.jboss.arquillian.test.api.ArquillianResource; +import org.junit.jupiter.api.BeforeEach; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -239,36 +243,29 @@ public String getContextRoot() { return _contextRoot; } + @ArquillianResource + @OperateOnDeployment("_DEFAULT_") + private URL url; + /** - * setup is by the test harness to initialize the tests. + * setup is run by the test files to initialize the tests. * - * @param args - * a String[] value - * @param p - * a Properties value - * @exception Fault - * if an error occurs */ - //public void setup(String[] args, Properties p) { - public void setup() { - TestUtil.logTrace("setup method JAXRSCommonClient"); + public void setup() { - String hostname = System.getProperty(SERVLETHOSTPROP); - String portnum = System.getProperty(SERVLETPORTPROP); - //String tshome = p.getProperty(TSHOME); + TestUtil.logTrace("setup method JAXRSCommonClient"); - assertTrue(!isNullOrEmpty(hostname), - "[JAXRSCommonClient] 'webServerHost' was not set."); + assertFalse((url==null), "[JAXRSCommonClient] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSCommonClient] 'webServerHost' was not set."); _hostname = hostname.trim(); - assertTrue(!isNullOrEmpty(portnum), - "[JAXRSCommonClient] 'webServerPort' was not set."); + assertFalse(isNullOrEmpty(portnum), "[JAXRSCommonClient] 'webServerPort' was not set."); _port = Integer.parseInt(portnum.trim()); - - //assertTrue(!isNullOrEmpty(tshome), - // "[JAXRSCommonClient] 'tshome' was not set in the build.properties."); - //_tsHome = tshome.trim(); - TestUtil.logMsg("[JAXRSCommonClient] Test setup OK"); + } /** diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/java2entity/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/java2entity/JAXRSClientIT.java index 5d90c040a..ebbb29072 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/java2entity/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/java2entity/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -46,10 +46,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_resource_java2entity_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/webappexception/mapper/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/webappexception/mapper/JAXRSClientIT.java index e4b14ee20..17d8b7233 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/webappexception/mapper/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/webappexception/mapper/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -44,10 +44,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_resource_webappexception_mapper_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/webappexception/nomapper/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/webappexception/nomapper/JAXRSClientIT.java index f984281c6..39c2210e3 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/webappexception/nomapper/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/webappexception/nomapper/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2020, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -44,10 +44,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_resource_webappexception_nomapper_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/BeanParamCommonClient.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/BeanParamCommonClient.java index a8016a662..efaf9539f 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/BeanParamCommonClient.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/BeanParamCommonClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -158,7 +158,7 @@ protected void checkCookie(String cookie) throws Fault { found = true; } assertTrue(found, "Could not find cookie" + cookie+ "in response headers:" + - JaxrsUtil.iterableToString(";", headers)); + JaxrsUtil.iterableToString(";", (Object)headers)); logMsg("Found cookie", cookie, "as expected"); } diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/cookie/plain/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/cookie/plain/JAXRSClientIT.java index 3c2231a15..3bc4c6f3c 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/cookie/plain/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/cookie/plain/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -62,10 +62,14 @@ public class JAXRSClientIT extends BeanParamCommonClient { private static final long serialVersionUID = 201L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_beanparam_cookie_plain_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/form/plain/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/form/plain/JAXRSClientIT.java index 8a488e54f..17a358704 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/form/plain/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/form/plain/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -62,10 +62,14 @@ public class JAXRSClientIT extends BeanParamCommonClient { private static final long serialVersionUID = 201L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_beanparam_form_plain_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/header/plain/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/header/plain/JAXRSClientIT.java index 173ce1482..22a823013 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/header/plain/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/header/plain/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -62,10 +62,14 @@ public class JAXRSClientIT extends BeanParamCommonClient { private static final long serialVersionUID = 201L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_beanparam_header_plain_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/matrix/plain/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/matrix/plain/JAXRSClientIT.java index f2798523f..6d2014723 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/matrix/plain/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/matrix/plain/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -63,10 +63,14 @@ public class JAXRSClientIT extends BeanParamCommonClient { private static final long serialVersionUID = 201L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_beanparam_matrix_plain_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/path/plain/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/path/plain/JAXRSClientIT.java index 540c55903..86af332da 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/path/plain/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/path/plain/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -61,10 +61,14 @@ public class JAXRSClientIT extends BeanParamCommonClient { private static final long serialVersionUID = 201L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_beanparam_path_plain_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/plain/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/plain/JAXRSClientIT.java index 0c26e721e..8d79c5b20 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/plain/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/plain/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -81,10 +81,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final String TWELVENTH = "Twelveth"; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_beanparam_plain_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/query/plain/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/query/plain/JAXRSClientIT.java index cb7aea107..e5d827f8b 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/query/plain/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/query/plain/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -63,10 +63,14 @@ public class JAXRSClientIT extends BeanParamCommonClient { private static final long serialVersionUID = 201L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_beanparam_query_plain_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/asyncinvoker/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/asyncinvoker/JAXRSClientIT.java index 341c1daf5..04dd7b7c5 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/asyncinvoker/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/asyncinvoker/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -71,10 +71,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private final static String NONEXISTING_SITE = "somenonexisting.domain-site"; public JAXRSClientIT() { - setup(); setContextRoot("jaxrs_ee_rs_client_asyncinvoker_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + static final String[] METHODS = { "DELETE", "GET", "OPTIONS" }; static final String[] ENTITY_METHODS = { "PUT", "POST" }; diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/clientrequestcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/clientrequestcontext/JAXRSClientIT.java index 923dcd498..264ba7e09 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/clientrequestcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/clientrequestcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -55,9 +55,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = -3234850442044177095L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_client_clientrequestcontext_web/resource"); } + + @BeforeEach + public void setup() { + super.setup(); + } @BeforeEach void logStartTest(TestInfo testInfo) { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/invocationbuilder/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/invocationbuilder/JAXRSClientIT.java index 8f1f5d2d9..e67e6b83b 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/invocationbuilder/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/invocationbuilder/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -61,10 +61,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = -8097693127928445210L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_client_invocationbuilder_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/syncinvoker/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/syncinvoker/JAXRSClientIT.java index 96047e776..36e897dbb 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/syncinvoker/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/client/syncinvoker/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -62,10 +62,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { protected long millis; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_client_syncinvoker_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/constrainedto/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/constrainedto/JAXRSClientIT.java index a302a6c3e..c4f30c90f 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/constrainedto/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/constrainedto/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -60,10 +60,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 3343257931794865470L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_constrainedto_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/JAXRSClientIT.java index dc3d48a9d..d32d660c9 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -56,11 +56,15 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 111355567568365703L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_container_requestcontext_web/resource"); setPrintEntity(true); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/illegalstate/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/illegalstate/JAXRSClientIT.java index 3170084fa..bae1d16cb 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/illegalstate/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/illegalstate/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -49,11 +49,15 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = -8112756483664393579L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_container_requestcontext_illegalstate_web/resource"); setPrintEntity(true); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/security/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/security/JAXRSClientIT.java index 14a637430..ff5b0e68a 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/security/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/requestcontext/security/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -56,10 +56,24 @@ public class JAXRSClientIT extends JaxrsCommonClient { protected String password; public JAXRSClientIT() { - usersetup(); setContextRoot("/jaxrs_ee_rs_container_requestcontext_security_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + usersetup(); + } + + public void usersetup() { + user = System.getProperty("user"); + password = System.getProperty("password"); + assertTrue(!isNullOrEmpty(user), "user not set"); + assertTrue(!isNullOrEmpty(password), + "password not set"); + } + + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); @@ -91,15 +105,6 @@ public static WebArchive createDeployment() throws IOException { return archive; } - public void usersetup() { - user = System.getProperty("user"); - password = System.getProperty("password"); - assertTrue(!isNullOrEmpty(user), "user not set"); - assertTrue(!isNullOrEmpty(password), - "password not set"); - super.setup(); - } - /* * @testName: getSecurityContextTest * diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/resourceinfo/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/resourceinfo/JAXRSClientIT.java index eb393c867..ac2a6d473 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/resourceinfo/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/resourceinfo/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -47,11 +47,15 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = -2900337741491627385L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_container_resourceinfo_web/resource"); setPrintEntity(true); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/responsecontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/responsecontext/JAXRSClientIT.java index c40db3fbc..ea678e97f 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/responsecontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/container/responsecontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -66,11 +66,15 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 7090474648496503290L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_container_responsecontext_web/resource"); setPrintEntity(true); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/JAXRSClientIT.java index 704311c44..d463f9589 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -43,7 +43,6 @@ import org.jboss.shrinkwrap.api.spec.WebArchive; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.TestInfo; @@ -60,10 +59,14 @@ public class JAXRSClientIT extends JaxrsParamClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_cookieparam_web/CookieParamTest"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); @@ -74,7 +77,7 @@ void logFinishTest(TestInfo testInfo) { TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } - @Deployment(testable = false, name = "cookieparam") + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ InputStream inStream = JAXRSClientIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/ws/rs/ee/rs/cookieparam/web.xml.template"); @@ -403,7 +406,7 @@ private void checkCookie(String cookie) throws Fault { found = true; } assertTrue(found, "Could not find cookie"+ cookie+ "in response headers:"+ - JaxrsUtil.iterableToString(";", headers)); + JaxrsUtil.iterableToString(";", (Object) headers)); logMsg("Found cookie", cookie, "as expected"); } diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/locator/JAXRSLocatorClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/locator/JAXRSLocatorClientIT.java index 96e87d83a..785247b32 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/locator/JAXRSLocatorClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/locator/JAXRSLocatorClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -17,6 +17,7 @@ package ee.jakarta.tck.ws.rs.ee.rs.cookieparam.locator; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.ee.rs.JaxrsParamClient; @@ -34,11 +35,14 @@ import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -59,21 +63,33 @@ public class JAXRSLocatorClientIT private static final long serialVersionUID = 1L; public JAXRSLocatorClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_cookieparam_locator_web/resource/locator"); } + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_rs_cookieparam_locator_web") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSLocatorClientIT"); + + assertFalse((url==null), "[JAXRSLocatorClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSLocatorClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSLocatorClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSLocatorClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } - @Deployment(testable = false, name = "cookieparamlocator") + + @Deployment(testable = false, name="jaxrs_ee_rs_cookieparam_locator_web") public static WebArchive createDeployment() throws IOException{ InputStream inStream = JAXRSLocatorClientIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/ws/rs/ee/rs/cookieparam/locator/web.xml.template"); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/sub/JAXRSSubClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/sub/JAXRSSubClientIT.java index f8305b2d1..0bec1ad35 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/sub/JAXRSSubClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/sub/JAXRSSubClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -17,6 +17,7 @@ package ee.jakarta.tck.ws.rs.ee.rs.cookieparam.sub; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.ee.rs.JaxrsParamClient; @@ -33,11 +34,14 @@ import ee.jakarta.tck.ws.rs.ee.rs.cookieparam.JAXRSClientIT; import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -58,21 +62,32 @@ public class JAXRSSubClientIT private static final long serialVersionUID = 1L; public JAXRSSubClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_cookieparam_sub_web/Resource/subresource"); } + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_rs_cookieparam_sub_web") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSSubClientIT"); + + assertFalse((url==null), "[JAXRSSubClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSSubClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSSubClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSSubClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } - @Deployment(testable = false, name = "cookieparamsub") + @Deployment(testable = false, name = "jaxrs_ee_rs_cookieparam_sub_web") public static WebArchive createDeployment() throws IOException{ InputStream inStream = JAXRSSubClientIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/ws/rs/ee/rs/cookieparam/sub/web.xml.template"); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/application/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/application/JAXRSClientIT.java index e5d033845..a7119f4f7 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/application/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/application/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -50,10 +50,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_core_application_web/ApplicationTest"); } + @BeforeEach + public void setup() { + super.setup(); + } + private static final long serialVersionUID = 1L; protected int expectedSingletons = 1; diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/configurable/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/configurable/JAXRSClientIT.java index 75a92defe..d46ef83d1 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/configurable/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/configurable/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -73,11 +73,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private int registeredInstancesCnt = -1; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_core_configurable_web/resource"); } - + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/configuration/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/configuration/JAXRSClientIT.java index dd2ef32bf..5e588a762 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/configuration/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/configuration/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -80,10 +80,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 7215781408688132392L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_core_configuration_web/resource/echo"); } + @BeforeEach + public void setup() { + super.setup(); + } @BeforeEach void logStartTest(TestInfo testInfo) { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/headers/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/headers/JAXRSClientIT.java index bf016ef94..ad226cb4f 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/headers/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/headers/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -56,10 +56,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = -5727774504018187299L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_core_headers_web/HeadersTest"); } + @BeforeEach + public void setup() { + super.setup(); + } @BeforeEach void logStartTest(TestInfo testInfo) { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/request/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/request/JAXRSClientIT.java index bdda2fe49..17ce50e63 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/request/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/request/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -52,10 +52,13 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final String IF_NONE_MATCH = "If-None-Match: \"AAA\""; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_core_request_web/RequestTest"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/response/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/response/JAXRSClientIT.java index 771dce649..77e6c6d6e 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/response/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/response/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -85,11 +85,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 4182256439207983256L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_core_response_web/resource"); setPrintEntity(true); } + @BeforeEach + public void setup() { + super.setup(); + } @BeforeEach void logStartTest(TestInfo testInfo) { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/responsebuilder/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/responsebuilder/JAXRSClientIT.java index d35dfabf0..1a54bf2d9 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/responsebuilder/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/responsebuilder/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -54,10 +54,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_core_responsebuilder_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/securitycontext/basic/JAXRSBasicClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/securitycontext/basic/JAXRSBasicClientIT.java index 5efacca34..2a3fa45ba 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/securitycontext/basic/JAXRSBasicClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/securitycontext/basic/JAXRSBasicClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -56,10 +56,14 @@ public class JAXRSBasicClientIT private static final long serialVersionUID = 340277879725875946L; public JAXRSBasicClientIT() { - setup(); setContextRoot("/jaxrs_ee_core_securitycontext_basic_web/Servlet"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/uriinfo/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/uriinfo/JAXRSClientIT.java index 52a001c55..e91507245 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/uriinfo/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/core/uriinfo/JAXRSClientIT.java @@ -50,10 +50,13 @@ public class JAXRSClientIT extends JAXRSCommonClient { protected static final String RESOURCE = "resource"; public JAXRSClientIT() { - setup(); setContextRoot("/" + ROOT + "/" + RESOURCE); } + @BeforeEach + public void setup() { + super.setup(); + } @BeforeEach void logStartTest(TestInfo testInfo) { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/delete/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/delete/JAXRSClientIT.java index 4560c49a1..7d31121b5 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/delete/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/delete/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -46,10 +46,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 204493956987397506L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_delete_web"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/clientwriter/interceptorcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/clientwriter/interceptorcontext/JAXRSClientIT.java index 9e608b34c..bbc2964de 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/clientwriter/interceptorcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/clientwriter/interceptorcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -59,12 +59,16 @@ public class JAXRSClientIT extends WriterClient { private static final long serialVersionUID = -5479399808367387477L; public JAXRSClientIT() { - setup(); setContextRoot( "/jaxrs_ee_rs_ext_interceptor_clientwriter_interceptorcontext_web/resource"); addProviders(); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/clientwriter/writerinterceptorcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/clientwriter/writerinterceptorcontext/JAXRSClientIT.java index 7f784d89f..18a01812e 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/clientwriter/writerinterceptorcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/clientwriter/writerinterceptorcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -54,12 +54,16 @@ public class JAXRSClientIT extends WriterClient { private static final long serialVersionUID = 2500912584762173255L; public JAXRSClientIT() { - setup(); setContextRoot( "/jaxrs_ee_rs_ext_interceptor_clientwriter_writerinterceptorcontext_web/resource"); addProviders(); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerreader/interceptorcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerreader/interceptorcontext/JAXRSClientIT.java index d9dc19230..4d64724a6 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerreader/interceptorcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerreader/interceptorcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -65,11 +65,15 @@ public class JAXRSClientIT extends ReaderClient { private static final long serialVersionUID = 6573164759617152350L; public JAXRSClientIT() { - setup(); setContextRoot( "/jaxrs_ee_rs_ext_interceptor_containerreader_interceptorcontext_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerreader/readerinterceptorcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerreader/readerinterceptorcontext/JAXRSClientIT.java index 9751f813b..02a6958a3 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerreader/readerinterceptorcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerreader/readerinterceptorcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -61,11 +61,15 @@ public class JAXRSClientIT extends ee.jakarta.tck.ws.rs.ee.rs.ext.interceptor.co private static final long serialVersionUID = 3006391868445878375L; public JAXRSClientIT() { - setup(); setContextRoot( "/jaxrs_ee_rs_ext_interceptor_containerreader_readerinterceptorcontext_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerwriter/interceptorcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerwriter/interceptorcontext/JAXRSClientIT.java index 9af3e5444..97260f439 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerwriter/interceptorcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerwriter/interceptorcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -55,11 +55,15 @@ public class JAXRSClientIT extends WriterClient { private static final long serialVersionUID = -3980167967224950515L; public JAXRSClientIT() { - setup(); setContextRoot( "/jaxrs_ee_rs_ext_interceptor_containerwriter_interceptorcontext_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerwriter/writerinterceptorcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerwriter/writerinterceptorcontext/JAXRSClientIT.java index 11c67067c..6b8265349 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerwriter/writerinterceptorcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/interceptor/containerwriter/writerinterceptorcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -53,11 +53,15 @@ public class JAXRSClientIT extends WriterClient { private static final long serialVersionUID = -8158424518609416304L; public JAXRSClientIT() { - setup(); setContextRoot( "/jaxrs_ee_rs_ext_interceptor_containerwriter_writerinterceptorcontext_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/paramconverter/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/paramconverter/JAXRSClientIT.java index 47fff8da7..2b2115034 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/paramconverter/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/paramconverter/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -51,10 +51,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 863071027768369551L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_ext_paramconverter_web"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/providers/JAXRSProvidersClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/providers/JAXRSProvidersClientIT.java index 868740ac8..31087f027 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/providers/JAXRSProvidersClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/ext/providers/JAXRSProvidersClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -68,13 +68,17 @@ public class JAXRSProvidersClientIT protected int expectedClasses = 1; public JAXRSProvidersClientIT() { - setup(); TSAppConfig cfg = new TSAppConfig(); setContextRoot("/jaxrs_ee_ext_providers_web/ProvidersServlet"); expectedClasses = cfg.getClasses().size(); expectedSingletons = cfg.getSingletons().size(); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/JAXRSClientIT.java index 2951e369c..a1dca089f 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -58,10 +58,14 @@ public class JAXRSClientIT extends JaxrsParamClient { private static final String DECODED = "_`'$X Y@\"a a\""; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_formparam_web/FormParamTest"); } + @BeforeEach + public void setup() { + super.setup(); + } + private static final long serialVersionUID = 1L; @BeforeEach diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/locator/JAXRSLocatorClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/locator/JAXRSLocatorClientIT.java index 1d6fe019c..5f36886b3 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/locator/JAXRSLocatorClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/locator/JAXRSLocatorClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -29,15 +29,19 @@ import ee.jakarta.tck.ws.rs.ee.rs.formparam.JAXRSClientIT; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -56,22 +60,34 @@ public class JAXRSLocatorClientIT extends JAXRSClientIT { public JAXRSLocatorClientIT() { - setup(); setContextRoot("/jaxrs_ee_formparam_locator_web/resource/locator"); } - private static final long serialVersionUID = 1L; + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_formparam_locator_deployment") + private URL url; @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSLocatorClientIT"); + + assertFalse((url==null), "[JAXRSLocatorClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSLocatorClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSLocatorClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSLocatorClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } + private static final long serialVersionUID = 1L; + + @Deployment(testable = false, name = "jaxrs_ee_formparam_locator_deployment") public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/sub/JAXRSSubClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/sub/JAXRSSubClientIT.java index c5352a431..06a3516e0 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/sub/JAXRSSubClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/formparam/sub/JAXRSSubClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -27,15 +27,19 @@ import ee.jakarta.tck.ws.rs.ee.rs.formparam.FormParamTest; import ee.jakarta.tck.ws.rs.ee.rs.formparam.JAXRSClientIT; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -52,22 +56,33 @@ public class JAXRSSubClientIT extends JAXRSClientIT { public JAXRSSubClientIT() { - setup(); setContextRoot("/jaxrs_ee_formparam_sub_web/resource/sub"); } - private static final long serialVersionUID = 1L; + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_formparam_sub_deployment") + private URL url; @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSSubClientIT"); + + assertFalse((url==null), "[JAXRSSubClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSSubClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSSubClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSSubClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } + private static final long serialVersionUID = 1L; + @Deployment(testable = false, name = "jaxrs_ee_formparam_sub_deployment") public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/get/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/get/JAXRSClientIT.java index 07459fa1f..bbb0f87b4 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/get/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/get/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -48,10 +48,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_get_web/GetTest"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/head/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/head/JAXRSClientIT.java index acb8c9cc3..2768b2975 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/head/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/head/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -47,10 +47,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_head_web/HeadTest"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/JAXRSClientIT.java index 2b79013b9..d3b79dcfd 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -58,10 +58,14 @@ public class JAXRSClientIT extends JaxrsParamClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_headerparam_web/HeaderParamTest"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/locator/JAXRSLocatorClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/locator/JAXRSLocatorClientIT.java index 47eeabcb9..58bacbf0a 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/locator/JAXRSLocatorClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/locator/JAXRSLocatorClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -17,6 +17,7 @@ package ee.jakarta.tck.ws.rs.ee.rs.headerparam.locator; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.ee.rs.JaxrsParamClient; @@ -34,11 +35,14 @@ import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -57,18 +61,29 @@ public class JAXRSLocatorClientIT private static final long serialVersionUID = 1L; public JAXRSLocatorClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_headerparam_locator_web/resource/locator"); } + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_rs_headerparam_locator_deployment") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSSubClientIT"); + + assertFalse((url==null), "[JAXRSSubClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSSubClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSSubClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSSubClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } @Deployment(testable = false, name = "jaxrs_ee_rs_headerparam_locator_deployment") diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/sub/JAXRSSubClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/sub/JAXRSSubClientIT.java index fca073623..1662f9c45 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/sub/JAXRSSubClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/headerparam/sub/JAXRSSubClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -20,6 +20,7 @@ package ee.jakarta.tck.ws.rs.ee.rs.headerparam.sub; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.ee.rs.JaxrsParamClient; @@ -37,11 +38,14 @@ import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -62,20 +66,33 @@ public class JAXRSSubClientIT private static final long serialVersionUID = -7534318281215084279L; public JAXRSSubClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_headerparam_sub_web/resource/subresource"); } + + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_rs_headerparam_sub_deployment") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSSubClientIT"); + + assertFalse((url==null), "[JAXRSSubClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSSubClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSSubClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSSubClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } + @Deployment(testable = false, name = "jaxrs_ee_rs_headerparam_sub_deployment") public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/JAXRSClientIT.java index 0c7dc652f..12b714d5d 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -61,10 +61,14 @@ public class JAXRSClientIT extends JaxrsParamClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_matrixparam_web/MatrixParamTest"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); @@ -75,7 +79,7 @@ void logFinishTest(TestInfo testInfo) { TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } - @Deployment(testable = false, name = "jaxrs_ee_rs_matrixparam_deployment") + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ InputStream inStream = JAXRSClientIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/ws/rs/ee/rs/matrixparam/web.xml.template"); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/locator/JAXRSLocatorClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/locator/JAXRSLocatorClientIT.java index 529cacc70..19aaae336 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/locator/JAXRSLocatorClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/locator/JAXRSLocatorClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -17,6 +17,7 @@ package ee.jakarta.tck.ws.rs.ee.rs.matrixparam.locator; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.ee.rs.JaxrsParamClient; @@ -34,11 +35,14 @@ import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -59,18 +63,30 @@ public class JAXRSLocatorClientIT private static final long serialVersionUID = 1L; public JAXRSLocatorClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_matrixparam_locator_web/resource/locator"); } + + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_rs_matrixparam_locator_deployment") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSLocatorClientIT"); + + assertFalse((url==null), "[JAXRSLocatorClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSLocatorClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSLocatorClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSLocatorClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } @Deployment(testable = false, name = "jaxrs_ee_rs_matrixparam_locator_deployment") diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/sub/JAXRSSubClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/sub/JAXRSSubClientIT.java index 2050d3706..fa45ec962 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/sub/JAXRSSubClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/matrixparam/sub/JAXRSSubClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -17,6 +17,7 @@ package ee.jakarta.tck.ws.rs.ee.rs.matrixparam.sub; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.ee.rs.JaxrsParamClient; @@ -34,11 +35,14 @@ import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -59,21 +63,34 @@ public class JAXRSSubClientIT private static final long serialVersionUID = 1L; public JAXRSSubClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_matrixparam_sub_web/resource/subresource"); } + + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_rs_matrixparam_sub_web") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSSubClientIT"); + + assertFalse((url==null), "[JAXRSSubClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSSubClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSSubClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSSubClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } - @Deployment(testable = false) + + @Deployment(testable = false, name="jaxrs_ee_rs_matrixparam_sub_web") public static WebArchive createDeployment() throws IOException{ InputStream inStream = JAXRSSubClientIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/ws/rs/ee/rs/matrixparam/sub/web.xml.template"); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/options/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/options/JAXRSClientIT.java index d56d9456f..89fb30b21 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/options/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/options/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -48,10 +48,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_options_web/Options"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/JAXRSClientIT.java index 473417d27..c4d27db49 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -59,11 +59,15 @@ public class JAXRSClientIT extends JaxrsParamClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_pathparam_web/PathParamTest"); useDefaultValue = false; } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/locator/JAXRSLocatorClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/locator/JAXRSLocatorClientIT.java index d39fca7a8..a2c1e09da 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/locator/JAXRSLocatorClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/locator/JAXRSLocatorClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -17,6 +17,7 @@ package ee.jakarta.tck.ws.rs.ee.rs.pathparam.locator; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.ee.rs.ParamEntityPrototype; @@ -33,11 +34,14 @@ import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -58,22 +62,34 @@ public class JAXRSLocatorClientIT private static final long serialVersionUID = 1L; public JAXRSLocatorClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_pathparam_locator_web/resource/locator"); } + + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_rs_pathparam_locator_deployment") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSLocatorClientIT"); + + assertFalse((url==null), "[JAXRSLocatorClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSLocatorClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSLocatorClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSLocatorClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } @Deployment(testable = false, name = "jaxrs_ee_rs_pathparam_locator_deployment") - public static WebArchive createDeployment() throws IOException{ + public static WebArchive createDeployment() throws IOException { InputStream inStream = JAXRSLocatorClientIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/ws/rs/ee/rs/pathparam/locator/web.xml.template"); String webXml = editWebXmlString(inStream); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/sub/JAXRSSubClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/sub/JAXRSSubClientIT.java index ca5b91ec3..da9433d01 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/sub/JAXRSSubClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/pathparam/sub/JAXRSSubClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -17,6 +17,7 @@ package ee.jakarta.tck.ws.rs.ee.rs.pathparam.sub; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.ee.rs.ParamEntityPrototype; @@ -33,11 +34,14 @@ import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -58,18 +62,30 @@ public class JAXRSSubClientIT private static final long serialVersionUID = 1L; public JAXRSSubClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_pathparam_sub_web/resource/subresource"); } + + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_rs_pathparam_sub_deployment") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSSubClientIT"); + + assertFalse((url==null), "[JAXRSSubClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSSubClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSSubClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSSubClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } @Deployment(testable = false, name = "jaxrs_ee_rs_pathparam_sub_deployment") diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/produceconsume/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/produceconsume/JAXRSClientIT.java index 3007d4844..dc277f98b 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/produceconsume/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/produceconsume/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -50,10 +50,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 3927081991341346347L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_produceconsume_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/put/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/put/JAXRSClientIT.java index 011b2efb4..aebc8b13d 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/put/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/put/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -42,10 +42,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = -71817508809693264L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_put_web"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/queryparam/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/queryparam/JAXRSClientIT.java index 6d70920d0..f42cc1d6b 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/queryparam/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/queryparam/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -61,10 +61,14 @@ public class JAXRSClientIT extends JaxrsParamClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_queryparam_web/QueryParamTest"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/queryparam/sub/JAXRSSubClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/queryparam/sub/JAXRSSubClientIT.java index 8dad73f00..623c68ee2 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/queryparam/sub/JAXRSSubClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/queryparam/sub/JAXRSSubClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -20,6 +20,7 @@ package ee.jakarta.tck.ws.rs.ee.rs.queryparam.sub; import java.io.InputStream; +import java.net.URL; import java.io.IOException; import ee.jakarta.tck.ws.rs.ee.rs.JaxrsParamClient; @@ -37,11 +38,14 @@ import ee.jakarta.tck.ws.rs.lib.util.TestUtil; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -61,20 +65,32 @@ public class JAXRSSubClientIT private static final long serialVersionUID = 1L; public JAXRSSubClientIT() { - setup(); setContextRoot("/jaxrs_ee_rs_queryparam_sub_web/resource/subresource"); } + + @ArquillianResource + @OperateOnDeployment("jaxrs_ee_rs_queryparam_sub_deployment") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); - } + TestUtil.logTrace("setup method JAXRSSubClientIT"); + assertFalse((url==null), "[JAXRSSubClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSSubClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSSubClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSSubClientIT] Test setup OK"); + + } + @Deployment(testable = false, name = "jaxrs_ee_rs_queryparam_sub_deployment") public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/api/client/invocationbuilder/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/api/client/invocationbuilder/JAXRSClientIT.java index 8874ec713..657125c7f 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/api/client/invocationbuilder/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/api/client/invocationbuilder/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -50,10 +50,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 21L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs21_api_client_invocationbuilder_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/executor/async/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/executor/async/JAXRSClientIT.java index b01f6bcef..34210c8ef 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/executor/async/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/executor/async/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -17,6 +17,7 @@ package ee.jakarta.tck.ws.rs.jaxrs21.ee.client.executor.async; import java.io.IOException; +import java.net.URL; import ee.jakarta.tck.ws.rs.common.impl.TRACE; import ee.jakarta.tck.ws.rs.ee.rs.client.asyncinvoker.Resource; @@ -30,10 +31,13 @@ import jakarta.ws.rs.client.WebTarget; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -55,18 +59,30 @@ public class JAXRSClientIT private static final long serialVersionUID = 21L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_jaxrs21_ee_client_executor_async_web/resource"); } + + @ArquillianResource + @OperateOnDeployment("jaxrs21_ee_client_executor_async_deployment") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSSubClientIT"); + + assertFalse((url==null), "[JAXRSSubClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSSubClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSSubClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSSubClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } @Deployment(testable = false, name = "jaxrs21_ee_client_executor_async_deployment") diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/executor/rx/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/executor/rx/JAXRSClientIT.java index 96f709169..cef9d2bb2 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/executor/rx/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/executor/rx/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -17,6 +17,7 @@ package ee.jakarta.tck.ws.rs.jaxrs21.ee.client.executor.rx; import java.io.IOException; +import java.net.URL; import ee.jakarta.tck.ws.rs.common.impl.TRACE; import ee.jakarta.tck.ws.rs.jaxrs21.ee.client.rxinvoker.Resource; @@ -30,10 +31,13 @@ import jakarta.ws.rs.client.WebTarget; import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; @@ -58,18 +62,30 @@ public class JAXRSClientIT private static final long serialVersionUID = 21L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_jaxrs21_ee_client_executor_rx_web/resource"); } + + @ArquillianResource + @OperateOnDeployment("jaxrs21_ee_client_executor_rx_deployment") + private URL url; + @BeforeEach - void logStartTest(TestInfo testInfo) { - TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); - } + public void setup() { + + TestUtil.logTrace("setup method JAXRSClientIT"); + + assertFalse((url==null), "[JAXRSClientIT] 'url' was not injected."); + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[JAXRSClientIT] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[JAXRSClientIT] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + TestUtil.logMsg("[JAXRSClientIT] Test setup OK"); - @AfterEach - void logFinishTest(TestInfo testInfo) { - TestUtil.logMsg("FINISHED TEST : "+testInfo.getDisplayName()); } @Deployment(testable = false, name = "jaxrs21_ee_client_executor_rx_deployment") diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/rxinvoker/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/rxinvoker/JAXRSClientIT.java index f0483e5f5..80df4f3bb 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/rxinvoker/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/client/rxinvoker/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -76,10 +76,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private final static String NONEXISTING_SITE = "somenonexisting.domain-site"; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_jaxrs21_ee_client_rxinvoker_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/patch/server/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/patch/server/JAXRSClientIT.java index 4ac242b94..503754608 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/patch/server/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/patch/server/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -53,10 +53,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 21L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_jaxrs21_ee_patch_server_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/priority/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/priority/JAXRSClientIT.java index 0f57caf0d..5ed7ff883 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/priority/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/priority/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 21L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_jaxrs21_ee_priority_web"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/ssebroadcaster/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/ssebroadcaster/JAXRSClientIT.java index 677e89514..881a69b93 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/ssebroadcaster/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/ssebroadcaster/JAXRSClientIT.java @@ -70,10 +70,9 @@ public class JAXRSClientIT extends SSEJAXRSClient { public JAXRSClientIT() { setContextRoot("/jaxrs_jaxrs21_ee_sse_ssebroadcaster_web"); - setup(); } - @Override + @BeforeEach public void setup() { super.setup(); target = ClientBuilder.newClient() diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/sseeventsink/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/sseeventsink/JAXRSClientIT.java index 56022d091..03dbca552 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/sseeventsink/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/sseeventsink/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -74,10 +74,14 @@ public class JAXRSClientIT extends SSEJAXRSClient { protected int sleep = -1; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_jaxrs21_ee_sse_sseeventsink_web"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/sseeventsource/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/sseeventsource/JAXRSClientIT.java index 3a665372a..57945818c 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/sseeventsource/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/ee/sse/sseeventsource/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -85,11 +85,15 @@ public class JAXRSClientIT extends SSEJAXRSClient { private int mediaTestLevel = 0; public JAXRSClientIT() { - setup(); mediaTestLevel = 0; setContextRoot("/jaxrs_jaxrs21_ee_sse_sseeventsource_web"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/spec/classsubresourcelocator/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/spec/classsubresourcelocator/JAXRSClientIT.java index fa0b919f6..018469270 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/spec/classsubresourcelocator/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/spec/classsubresourcelocator/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -49,10 +49,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 21L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_jaxrs21_spec_classsubresourcelocator_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/spec/completionstage/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/spec/completionstage/JAXRSClientIT.java index 7910a39a5..a0204f8a8 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/spec/completionstage/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs21/spec/completionstage/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -51,10 +51,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 21L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_jaxrs21_spec_completionstage_web"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs31/spec/extensions/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs31/spec/extensions/JAXRSClientIT.java index d7abd7cd8..8cef09226 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs31/spec/extensions/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/jaxrs31/spec/extensions/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -47,10 +47,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 31L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_jaxrs31_spec_jdkservices_web"); } + @BeforeEach + public void setup() { + super.setup(); + } + @BeforeEach void logStartTest(TestInfo testInfo) { TestUtil.logMsg("STARTING TEST : "+testInfo.getDisplayName()); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/applicationpath/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/applicationpath/JAXRSClientIT.java index 1211d8531..8fcec4507 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/applicationpath/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/applicationpath/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { private static final long serialVersionUID = 1L; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_ee_applicationpath"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException { WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxrs_ee_applicationpath.war"); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/core/streamingoutput/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/core/streamingoutput/JAXRSClientIT.java index 1814a1a98..37d1fbcc4 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/core/streamingoutput/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/core/streamingoutput/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -46,10 +46,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { public static final String _root = "/jaxrs_ee_core_streamoutput/StreamOutputTest"; public JAXRSClientIT() { - setup(); setContextRoot(_root); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/ext/paramconverter/autodiscovery/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/ext/paramconverter/autodiscovery/JAXRSClientIT.java index 0745447e2..52acd993c 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/ext/paramconverter/autodiscovery/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/servlet3/rs/ext/paramconverter/autodiscovery/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -51,11 +51,15 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = 8764917394183731977L; public JAXRSClientIT() { - setup(); setContextRoot( "/jaxrs_servlet3_rs_ext_paramconverter_autodiscovery/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/instance/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/instance/JAXRSClientIT.java index 6c10069e1..869ec5687 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/instance/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/instance/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -61,7 +61,6 @@ void logFinishTest(TestInfo testInfo) { public JAXRSClientIT() { - setup(); Client client = ClientBuilder.newClient(); Configuration config = client.getConfiguration(); registeredPropertyCnt = config.getProperties().size(); @@ -71,7 +70,6 @@ public JAXRSClientIT() { } - /* Run test */ /* * @testName: defaultClientConfigurationPresetTest diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/invocations/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/invocations/JAXRSClientIT.java index eb38a1b58..ec1b6f3cd 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/invocations/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/invocations/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -51,10 +51,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_client_invocations_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/resource/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/resource/JAXRSClientIT.java index 0c7956f3a..c97713219 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/resource/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/resource/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -41,10 +41,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_client_resource_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/typedentities/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/typedentities/JAXRSClientIT.java index f0c499612..054760712 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/typedentities/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/typedentities/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -66,10 +66,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final String entity = Resource.class.getName(); public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_client_typedentities_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/typedentitieswithxmlbinding/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/typedentitieswithxmlbinding/JAXRSClientIT.java index b876fd55c..a39c335e5 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/typedentitieswithxmlbinding/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/typedentitieswithxmlbinding/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -50,10 +50,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final String entity = Resource.class.getName(); public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_client_typedentitieswithxmlbinding_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/webtarget/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/webtarget/JAXRSClientIT.java index ff0348041..4f8e83077 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/webtarget/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/client/webtarget/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -44,10 +44,8 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_client_webtarget_web/resource"); } - @BeforeEach void logStartTest(TestInfo testInfo) { diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/context/client/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/context/client/JAXRSClientIT.java index e43cc1f9b..26bd91772 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/context/client/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/context/client/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_context_client_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/context/server/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/context/server/JAXRSClientIT.java index 6ea53f293..91edf401b 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/context/server/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/context/server/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -43,10 +43,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_context_server_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/dynamicfeature/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/dynamicfeature/JAXRSClientIT.java index fa58ed97c..f7df8fb00 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/dynamicfeature/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/dynamicfeature/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_filter_dynamicfeature_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/exception/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/exception/JAXRSClientIT.java index 779703d50..417ba82b6 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/exception/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/exception/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -46,10 +46,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_filter_exception_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/globalbinding/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/globalbinding/JAXRSClientIT.java index 23d7214ef..6704fa5f3 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/globalbinding/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/globalbinding/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_filter_globalbinding_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/interceptor/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/interceptor/JAXRSClientIT.java index a258a9c8c..23e0f7a56 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/interceptor/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/interceptor/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -82,10 +82,13 @@ private static String getJaxbToken() { } public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_filter_interceptor_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/lastvalue/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/lastvalue/JAXRSClientIT.java index 4f74abbde..c1ea44cca 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/lastvalue/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/lastvalue/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -52,10 +52,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { public static final String plaincontent = JAXRSClientIT.class.getName(); public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_filter_lastvalue_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/namebinding/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/namebinding/JAXRSClientIT.java index a0612bc0c..ee92f285a 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/namebinding/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/filter/namebinding/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_filter_namebinding_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/inheritance/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/inheritance/JAXRSClientIT.java index 4f6074470..de4a6662e 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/inheritance/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/inheritance/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -40,11 +40,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_inheritance_web"); } - + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ InputStream inStream = JAXRSClientIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/ws/rs/spec/inheritance/web.xml.template"); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/exceptionmapper/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/exceptionmapper/JAXRSClientIT.java index 95bf55079..ab3a7f8cc 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/exceptionmapper/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/exceptionmapper/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,13 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_exceptionmapper_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/jaxbcontext/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/jaxbcontext/JAXRSClientIT.java index 8f1d04f8a..bb069cd07 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/jaxbcontext/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/jaxbcontext/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -46,10 +46,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_jaxbcontext_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + private void setPropertyAndInvoke(String resourceMethod) throws Fault { setProperty(Property.REQUEST, buildRequest(Request.POST, resourceMethod)); setProperty(Property.REQUEST_HEADERS, diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/overridestandard/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/overridestandard/JAXRSClientIT.java index 1dbd47b25..dbae6a23e 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/overridestandard/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/overridestandard/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -48,10 +48,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_overridestandard_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + private void setPropertyAndInvoke(String resourceMethod, MediaType md) throws Fault { String ct = buildContentType(md); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/reader/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/reader/JAXRSClientIT.java index b0888ea77..fe880e3f2 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/reader/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/reader/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -46,10 +46,13 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_reader_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/sort/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/sort/JAXRSClientIT.java index db4310c45..cee5cf046 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/sort/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/sort/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -47,10 +47,13 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_sort_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standard/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standard/JAXRSClientIT.java index df778ab79..411313471 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standard/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standard/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -51,10 +51,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_standard_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + private void setPropertyAndInvoke(String resourceMethod, MediaType md) throws Fault { String ct = buildContentType(md); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardhaspriority/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardhaspriority/JAXRSClientIT.java index 66a521423..dff938442 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardhaspriority/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardhaspriority/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -49,10 +49,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_standardhaspriority_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + private void setPropertyAndInvoke(String resourceMethod, MediaType md) throws Fault { String ct = buildContentType(md); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardnotnull/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardnotnull/JAXRSClientIT.java index 767652c49..d11421468 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardnotnull/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardnotnull/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -62,10 +62,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_standardnotnull_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardwithjaxrsclient/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardwithjaxrsclient/JAXRSClientIT.java index beecbaf2c..36afa3faf 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardwithjaxrsclient/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardwithjaxrsclient/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -47,10 +47,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_standardwithjaxrsclient_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + private void setPropertyAndInvoke(String resourceMethod, MediaType md) throws Fault { String ct = buildContentType(md); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardwithxmlbinding/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardwithxmlbinding/JAXRSClientIT.java index bf372eed4..77a5fc365 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardwithxmlbinding/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/standardwithxmlbinding/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_standardwithxmlbinding_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + private void setPropertyAndInvoke(String resourceMethod, MediaType md) throws Fault { String ct = buildContentType(md); diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/visibility/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/visibility/JAXRSClientIT.java index 72ed4fca2..109c6ebbe 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/visibility/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/visibility/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -44,10 +44,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_visibility_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/writer/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/writer/JAXRSClientIT.java index 052e85df3..4f3a41015 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/writer/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/provider/writer/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_provider_writer_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/annotationprecedence/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/annotationprecedence/JAXRSClientIT.java index 8144e1318..c1521b7c4 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/annotationprecedence/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/annotationprecedence/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -44,10 +44,13 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_resource_annotationprecedence_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/annotationprecedence/subclass/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/annotationprecedence/subclass/JAXRSClientIT.java index 6b982e435..b6dc91e20 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/annotationprecedence/subclass/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/annotationprecedence/subclass/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -46,11 +46,15 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot( "/jaxrs_spec_resource_annotationprecedence_subclass_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/locator/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/locator/JAXRSClientIT.java index 2177dda62..58586ddf6 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/locator/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/locator/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -41,10 +41,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_resource_locator_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/requestmatching/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/requestmatching/JAXRSClientIT.java index 83f37deb0..5a4e35c4b 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/requestmatching/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/requestmatching/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,13 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_resource_requestmatching_web"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/responsemediatype/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/responsemediatype/JAXRSClientIT.java index a6048033d..ecd33262d 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/responsemediatype/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/responsemediatype/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,13 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_resource_responsemediatype_web"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/valueofandfromstring/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/valueofandfromstring/JAXRSClientIT.java index 9ea80e9e6..e2a1cb987 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/valueofandfromstring/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resource/valueofandfromstring/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final String DATA = "ASDFGHJKLQWERTYUIOPPPPPPP"; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_resource_valueofandfromstring_web"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resourceconstructor/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resourceconstructor/JAXRSClientIT.java index 58abbc9f7..904525045 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resourceconstructor/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/resourceconstructor/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -45,10 +45,14 @@ public class JAXRSClientIT extends JaxrsCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_resourceconstructor_web/resource"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/returntype/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/returntype/JAXRSClientIT.java index 90ac63c06..a3942c3e5 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/returntype/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/returntype/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -51,10 +51,13 @@ public class JAXRSClientIT extends JaxrsCommonClient { private static final long serialVersionUID = ReturnTypeTest.serialVersionUID; public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_returntype_web/ReturnTypeTest"); } + @BeforeEach + public void setup() { + super.setup(); + } @Deployment(testable = false) diff --git a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/template/JAXRSClientIT.java b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/template/JAXRSClientIT.java index cd4ee4867..d9f0c27d8 100644 --- a/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/template/JAXRSClientIT.java +++ b/jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/spec/template/JAXRSClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -38,10 +38,14 @@ public class JAXRSClientIT extends JAXRSCommonClient { public JAXRSClientIT() { - setup(); setContextRoot("/jaxrs_spec_templateTest_web"); } + @BeforeEach + public void setup() { + super.setup(); + } + @Deployment(testable = false) public static WebArchive createDeployment() throws IOException{ diff --git a/jersey-tck/pom.xml b/jersey-tck/pom.xml index ef76456cb..9651acce7 100644 --- a/jersey-tck/pom.xml +++ b/jersey-tck/pom.xml @@ -1,7 +1,7 @@ @@ -101,7 +109,7 @@ jakarta.ws.rs jakarta.ws.rs-api - ${project.parent.version} + ${project.version} test @@ -149,10 +157,17 @@ ${jersey.version} test + - org.netbeans.tools + org.glassfish.jersey.media + jersey-media-multipart + 4.0-M1-GF1 + + + + jakarta.tck sigtest-maven-plugin - 1.4 + 2.2 org.glassfish.jersey.media @@ -160,6 +175,7 @@ ${jersey.version} test + org.glassfish.jersey.media jersey-media-jaxb @@ -201,7 +217,8 @@ - + + + + + + maven-antrun-plugin + 3.0.0 + + + + run + + pre-integration-test + + + + + + + + exec-maven-plugin org.codehaus.mojo @@ -306,7 +343,7 @@ exec - ${project.build.directory}/glassfish6/glassfish/bin/asadmin + ${glassfish.home}/glassfish/bin/asadmin stop-domain @@ -319,7 +356,7 @@ exec - ${project.build.directory}/glassfish6/glassfish/bin/asadmin + ${glassfish.home}/glassfish/bin/asadmin start-domain @@ -332,7 +369,7 @@ exec - ${project.build.directory}/glassfish6/glassfish/bin/asadmin + ${glassfish.home}/glassfish/bin/asadmin set server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=true @@ -346,7 +383,7 @@ exec - ${project.build.directory}/glassfish6/glassfish/bin/asadmin + ${glassfish.home}/glassfish/bin/asadmin --passwordfile ${project.basedir}/j2ee.pass @@ -366,7 +403,7 @@ exec - ${project.build.directory}/glassfish6/glassfish/bin/asadmin + ${glassfish.home}/glassfish/bin/asadmin --passwordfile ${project.basedir}/j2ee.pass @@ -384,7 +421,7 @@ exec - ${project.build.directory}/glassfish6/glassfish/bin/asadmin + ${glassfish.home}/glassfish/bin/asadmin --passwordfile ${project.basedir}/javajoe.pass @@ -404,7 +441,7 @@ exec - ${project.build.directory}/glassfish6/glassfish/bin/asadmin + ${glassfish.home}/glassfish/bin/asadmin --passwordfile ${project.basedir}/javajoe.pass @@ -422,7 +459,7 @@ exec - ${project.build.directory}/glassfish6/glassfish/bin/asadmin + ${glassfish.home}/glassfish/bin/asadmin list-file-users @@ -435,7 +472,7 @@ exec - ${project.build.directory}/glassfish6/glassfish/bin/asadmin + ${glassfish.home}/glassfish/bin/asadmin stop-domain @@ -462,8 +499,6 @@ ${glassfish.home} org.glassfish.jersey.servlet.ServletContainer - localhost - 8080 true j2ee j2ee