From ef0d705b66d8d17cc53463d748251ddb21230e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mat=C4=9Bj=C4=8Dek?= Date: Fri, 7 Feb 2025 21:53:16 +0100 Subject: [PATCH 1/2] Updated TestContainers, fixed imports in some of TCK modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: David Matějček --- .../glassfish/jaccApi/common/ArquillianBase.java | 16 ++++++++-------- .../jaccApi/common/TestAuthConfigProvider.java | 8 +++++--- .../jaccApi/common/TestServerAuthConfig.java | 10 ++++++---- .../jaccApi/common/TestServerAuthContext.java | 10 ++++++---- appserver/tests/pom.xml | 4 ++-- .../main/java/com/sun/ts/lib/harness/EETest.java | 2 ++ .../com/sun/ts/lib/harness/ServiceEETest.java | 3 ++- .../tests/common/vehicle/EmptyVehicleRunner.java | 2 ++ .../ts/tests/common/vehicle/VehicleRunnable.java | 3 +++ .../common/vehicle/ejbembed/EJBEmbedRunner.java | 2 ++ .../EJBLiteSecuredWebVehicleRunner.java | 2 ++ .../ejbliteshare/EJBLiteWebVehicleRunner.java | 3 +++ .../java/com/sun/ts/run/EmbeddedRunnerITest.java | 3 ++- .../com/sun/ts/run/StandaloneRunnerITest.java | 4 +++- appserver/tests/tck/platform-tck-runner/pom.xml | 5 +++++ 15 files changed, 53 insertions(+), 24 deletions(-) diff --git a/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/ArquillianBase.java b/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/ArquillianBase.java index de07c87f318..973b5194ed0 100644 --- a/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/ArquillianBase.java +++ b/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/ArquillianBase.java @@ -16,11 +16,8 @@ package org.glassfish.jaccApi.common; -import static java.lang.Boolean.getBoolean; -import static java.util.logging.Level.SEVERE; -import static org.jboss.shrinkwrap.api.ShrinkWrap.create; -import static org.jsoup.Jsoup.parse; -import static org.jsoup.parser.Parser.xmlParser; +import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; +import com.gargoylesoftware.htmlunit.WebClient; import java.io.File; import java.io.IOException; @@ -29,17 +26,20 @@ import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.Archive; +import org.jboss.shrinkwrap.api.importer.ZipImporter; import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.jboss.shrinkwrap.api.importer.ZipImporter; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.rules.TestWatcher; import org.junit.runner.Description; -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; +import static java.lang.Boolean.getBoolean; +import static java.util.logging.Level.SEVERE; +import static org.jboss.shrinkwrap.api.ShrinkWrap.create; +import static org.jsoup.Jsoup.parse; +import static org.jsoup.parser.Parser.xmlParser; public class ArquillianBase { diff --git a/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestAuthConfigProvider.java b/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestAuthConfigProvider.java index d1fa1840e51..a03dbf74e80 100644 --- a/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestAuthConfigProvider.java +++ b/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestAuthConfigProvider.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025 Contributors to the Eclipse Foundation * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,9 +17,6 @@ package org.glassfish.jaccApi.common; -import java.util.Map; - -import javax.security.auth.callback.CallbackHandler; import jakarta.security.auth.message.AuthException; import jakarta.security.auth.message.config.AuthConfigFactory; import jakarta.security.auth.message.config.AuthConfigProvider; @@ -27,6 +25,10 @@ import jakarta.security.auth.message.config.ServerAuthContext; import jakarta.security.auth.message.module.ServerAuthModule; +import java.util.Map; + +import javax.security.auth.callback.CallbackHandler; + /** * This class functions as a kind of factory-factory for {@link ServerAuthConfig} instances, which are by themselves factories * for {@link ServerAuthContext} instances, which are delegates for the actual {@link ServerAuthModule} (SAM) that we're after. diff --git a/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestServerAuthConfig.java b/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestServerAuthConfig.java index 74e88976bb2..ab78ceed103 100644 --- a/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestServerAuthConfig.java +++ b/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestServerAuthConfig.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025 Contributors to the Eclipse Foundation * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,16 +17,17 @@ package org.glassfish.jaccApi.common; -import java.util.Map; - -import javax.security.auth.Subject; -import javax.security.auth.callback.CallbackHandler; import jakarta.security.auth.message.AuthException; import jakarta.security.auth.message.MessageInfo; import jakarta.security.auth.message.config.ServerAuthConfig; import jakarta.security.auth.message.config.ServerAuthContext; import jakarta.security.auth.message.module.ServerAuthModule; +import java.util.Map; + +import javax.security.auth.Subject; +import javax.security.auth.callback.CallbackHandler; + /** * This class functions as a kind of factory for {@link ServerAuthContext} instances, which are delegates for the actual * {@link ServerAuthModule} (SAM) that we're after. diff --git a/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestServerAuthContext.java b/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestServerAuthContext.java index 814ce57bdc5..0481eac57c3 100644 --- a/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestServerAuthContext.java +++ b/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/TestServerAuthContext.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025 Contributors to the Eclipse Foundation * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,10 +17,6 @@ package org.glassfish.jaccApi.common; -import java.util.Collections; - -import javax.security.auth.Subject; -import javax.security.auth.callback.CallbackHandler; import jakarta.security.auth.message.AuthException; import jakarta.security.auth.message.AuthStatus; import jakarta.security.auth.message.MessageInfo; @@ -27,6 +24,11 @@ import jakarta.security.auth.message.config.ServerAuthContext; import jakarta.security.auth.message.module.ServerAuthModule; +import java.util.Collections; + +import javax.security.auth.Subject; +import javax.security.auth.callback.CallbackHandler; + /** * The Server Authentication Context is an extra (required) indirection between the Application Server and the actual Server * Authentication Module (SAM). This can be used to encapsulate any number of SAMs and either select one at run-time, invoke diff --git a/appserver/tests/pom.xml b/appserver/tests/pom.xml index 4d57c710c5c..94c0de73760 100755 --- a/appserver/tests/pom.xml +++ b/appserver/tests/pom.xml @@ -39,13 +39,13 @@ org.testcontainers testcontainers - 1.20.3 + 1.20.4 test org.testcontainers junit-jupiter - 1.20.3 + 1.20.4 test diff --git a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/lib/harness/EETest.java b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/lib/harness/EETest.java index eedcc311d3e..245fb005398 100644 --- a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/lib/harness/EETest.java +++ b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/lib/harness/EETest.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025 Contributors to the Eclipse Foundation * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,6 +17,7 @@ package com.sun.ts.lib.harness; +import com.sun.javatest.Status; import com.sun.ts.lib.util.TestUtil; import java.io.File; diff --git a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java index f6ce3e4d6d1..ce3c078e7fa 100644 --- a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java +++ b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Contributors to the Eclipse Foundation. + * Copyright (c) 2023, 2025 Contributors to the Eclipse Foundation. * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -17,6 +17,7 @@ package com.sun.ts.lib.harness; +import com.sun.javatest.Status; import com.sun.ts.lib.util.TestUtil; import com.sun.ts.tests.common.vehicle.VehicleRunnable; import com.sun.ts.tests.common.vehicle.VehicleRunnerFactory; diff --git a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/EmptyVehicleRunner.java b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/EmptyVehicleRunner.java index e0501d97363..48977006cb6 100644 --- a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/EmptyVehicleRunner.java +++ b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/EmptyVehicleRunner.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025 Contributors to the Eclipse Foundation * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -20,6 +21,7 @@ package com.sun.ts.tests.common.vehicle; +import com.sun.javatest.Status; import com.sun.ts.lib.harness.ServiceEETest; import com.sun.ts.lib.util.TestUtil; diff --git a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnable.java b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnable.java index ac5b18e98ee..e5cbb7cbaf1 100644 --- a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnable.java +++ b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnable.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025 Contributors to the Eclipse Foundation * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -20,6 +21,8 @@ package com.sun.ts.tests.common.vehicle; +import com.sun.javatest.Status; + import java.util.Properties; public interface VehicleRunnable { diff --git a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/EJBEmbedRunner.java b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/EJBEmbedRunner.java index 3106523d110..760d8484c01 100644 --- a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/EJBEmbedRunner.java +++ b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/EJBEmbedRunner.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025 Contributors to the Eclipse Foundation * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -20,6 +21,7 @@ package com.sun.ts.tests.common.vehicle.ejbembed; +import com.sun.javatest.Status; import com.sun.ts.lib.util.TestUtil; import com.sun.ts.tests.common.vehicle.VehicleRunnable; import com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF; diff --git a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteSecuredWebVehicleRunner.java b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteSecuredWebVehicleRunner.java index 84f6d74cce3..323bf6b3304 100644 --- a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteSecuredWebVehicleRunner.java +++ b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteSecuredWebVehicleRunner.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025 Contributors to the Eclipse Foundation * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,6 +17,7 @@ package com.sun.ts.tests.common.vehicle.ejbliteshare; +import com.sun.javatest.Status; import com.sun.ts.lib.porting.TSURL; import com.sun.ts.lib.util.BASE64Encoder; import com.sun.ts.lib.util.TestUtil; diff --git a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteWebVehicleRunner.java b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteWebVehicleRunner.java index e298fb24600..341c1f6db55 100644 --- a/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteWebVehicleRunner.java +++ b/appserver/tests/tck/embedded_ejb_smoke/ejb_lite_basic/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteWebVehicleRunner.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025 Contributors to the Eclipse Foundation * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -17,8 +18,10 @@ /* * $Id$ */ + package com.sun.ts.tests.common.vehicle.ejbliteshare; +import com.sun.javatest.Status; import com.sun.ts.lib.porting.TSURL; import com.sun.ts.lib.util.TestUtil; import com.sun.ts.tests.common.vehicle.VehicleRunnable; diff --git a/appserver/tests/tck/embedded_ejb_smoke/runner/src/test/java/com/sun/ts/run/EmbeddedRunnerITest.java b/appserver/tests/tck/embedded_ejb_smoke/runner/src/test/java/com/sun/ts/run/EmbeddedRunnerITest.java index 9904650d8da..ad1a3965d8c 100644 --- a/appserver/tests/tck/embedded_ejb_smoke/runner/src/test/java/com/sun/ts/run/EmbeddedRunnerITest.java +++ b/appserver/tests/tck/embedded_ejb_smoke/runner/src/test/java/com/sun/ts/run/EmbeddedRunnerITest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Contributors to the Eclipse Foundation. All rights reserved. + * Copyright (c) 2021, 2025 Contributors to the Eclipse Foundation * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -15,6 +15,7 @@ */ package com.sun.ts.run; +import com.sun.javatest.Status; import com.sun.ts.lib.harness.ExecTSTestCmd; import java.io.IOException; diff --git a/appserver/tests/tck/expression_language/src/test/java/com/sun/ts/run/StandaloneRunnerITest.java b/appserver/tests/tck/expression_language/src/test/java/com/sun/ts/run/StandaloneRunnerITest.java index f308aea1ab5..9bdb3e75c69 100644 --- a/appserver/tests/tck/expression_language/src/test/java/com/sun/ts/run/StandaloneRunnerITest.java +++ b/appserver/tests/tck/expression_language/src/test/java/com/sun/ts/run/StandaloneRunnerITest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2022 Contributors to the Eclipse Foundation. All rights reserved. + * Copyright (c) 2022, 2025 Contributors to the Eclipse Foundation * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -13,8 +13,10 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ + package com.sun.ts.run; +import com.sun.javatest.Status; import com.sun.ts.lib.harness.ExecTSTestCmd; import java.io.IOException; diff --git a/appserver/tests/tck/platform-tck-runner/pom.xml b/appserver/tests/tck/platform-tck-runner/pom.xml index e629f9b1d94..b9a4386065f 100644 --- a/appserver/tests/tck/platform-tck-runner/pom.xml +++ b/appserver/tests/tck/platform-tck-runner/pom.xml @@ -75,6 +75,10 @@ jakarta.annotation-api + + org.glassfish.main + glassfish-jul-extension + jakarta.inject jakarta.inject-api @@ -87,6 +91,7 @@ org.testcontainers testcontainers + compile From 31252f00dba97282e490fddbc5fe5a3d53c683c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mat=C4=9Bj=C4=8Dek?= Date: Sat, 8 Feb 2025 21:43:15 +0100 Subject: [PATCH 2/2] Added copyright for the last change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: David Matějček --- .../main/java/org/glassfish/jaccApi/common/ArquillianBase.java | 1 + 1 file changed, 1 insertion(+) diff --git a/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/ArquillianBase.java b/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/ArquillianBase.java index 973b5194ed0..455e53d65a2 100644 --- a/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/ArquillianBase.java +++ b/appserver/tests/appserv-tests/devtests/security/jaccApi/prog-auth/common/src/main/java/org/glassfish/jaccApi/common/ArquillianBase.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025 Contributors to the Eclipse Foundation * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the