From 6ab0067792fd86bf161f712eb2af445f1c11665c Mon Sep 17 00:00:00 2001 From: Alwin Joseph Date: Fri, 1 Dec 2023 01:56:10 +0530 Subject: [PATCH] fix failing 4 tests - use create-jvm-options to set properties - add missed out property files to jstlTCKCommonJar --- glassfish-runner/jstl-tck/pom.xml | 61 ++++++++++++++++--- .../jstl/common/client/AbstractUrlClient.java | 23 ++++--- .../jstl/spec/sql/query/JSTLClientIT.java | 2 +- .../common/resources/AlgoResources.properties | 18 ++++++ .../AlgoResources_en_IE_EURO.properties | 18 ++++++ 5 files changed, 105 insertions(+), 17 deletions(-) create mode 100644 jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties create mode 100644 jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties diff --git a/glassfish-runner/jstl-tck/pom.xml b/glassfish-runner/jstl-tck/pom.xml index 9daf257759..31abbb0e2f 100644 --- a/glassfish-runner/jstl-tck/pom.xml +++ b/glassfish-runner/jstl-tck/pom.xml @@ -155,7 +155,53 @@ - 3-EnableTraceRequests + 3-create-jvm-options + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + create-jvm-options + -Djavax.xml.accessExternalStylesheet=all + + + + + 4-create-jvm-options + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + create-jvm-options + -Djavax.xml.accessExternalDTD=file,http + + + + + 5-create-jvm-options + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + create-jvm-options + -Djavax.xml.accessExternalSchema=all + + + 0 + 1 + + + + + 6-EnableTraceRequests exec @@ -169,7 +215,7 @@ - 4-DeleteUser-j2ee + 7-DeleteUser-j2ee exec @@ -189,7 +235,7 @@ - 5-AddUser-j2ee + 8-AddUser-j2ee exec @@ -207,7 +253,7 @@ - 6-DeleteUser-javajoe + 9-DeleteUser-javajoe exec @@ -227,7 +273,7 @@ - 7-AddUser-javajoe + A-AddUser-javajoe exec @@ -245,7 +291,7 @@ - 8-list-users + B-list-users exec @@ -258,7 +304,7 @@ - 9-StopDomain + C-StopDomain exec @@ -272,7 +318,6 @@ - org.codehaus.mojo exec-maven-plugin diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java index be8c9c54d7..ef6ed3577b 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java @@ -26,6 +26,9 @@ import java.lang.System.Logger; import java.net.URL; +import com.sun.ts.tests.jstl.common.tags.TestTag; +import com.sun.ts.tests.jstl.common.resources.Resources_en; + import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; @@ -83,18 +86,22 @@ protected boolean isNullOrEmpty(String val) { } protected static JavaArchive getCommonJarArchive() { - String packagePathTags = com.sun.ts.tests.jstl.common.tags.TestTag.class.getPackageName().replace(".", "/"); + String packagePathTags = TestTag.class.getPackageName().replace(".", "/"); + String packagePathResources = Resources_en.class.getPackageName().replace(".", "/"); JavaArchive jstlTCKCommonJar = ShrinkWrap.create(JavaArchive.class, "jstltck-common.jar"); - jstlTCKCommonJar.addAsResource(new UrlAsset(com.sun.ts.tests.jstl.common.tags.TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/jstltck-util.tld")), "META-INF/jstltck-util.tld"); - jstlTCKCommonJar.addAsResource(new UrlAsset(com.sun.ts.tests.jstl.common.tags.TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/permitted.tld")), "META-INF/permitted.tld"); - jstlTCKCommonJar.addAsResource(new UrlAsset(com.sun.ts.tests.jstl.common.tags.TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_nodecl.tld")), "META-INF/scrfree_nodecl.tld"); - jstlTCKCommonJar.addAsResource(new UrlAsset(com.sun.ts.tests.jstl.common.tags.TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_noexpr.tld")), "META-INF/scrfree_noexpr.tld"); - jstlTCKCommonJar.addAsResource(new UrlAsset(com.sun.ts.tests.jstl.common.tags.TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_nortexpr.tld")), "META-INF/scrfree_nortexpr.tld"); - jstlTCKCommonJar.addAsResource(new UrlAsset(com.sun.ts.tests.jstl.common.tags.TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_noscr.tld")), "META-INF/scrfree_noscr.tld"); - + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/jstltck-util.tld")), "META-INF/jstltck-util.tld"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/permitted.tld")), "META-INF/permitted.tld"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_nodecl.tld")), "META-INF/scrfree_nodecl.tld"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_noexpr.tld")), "META-INF/scrfree_noexpr.tld"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_nortexpr.tld")), "META-INF/scrfree_nortexpr.tld"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_noscr.tld")), "META-INF/scrfree_noscr.tld"); + jstlTCKCommonJar.addPackages(true,"com.sun.ts.tests.jstl.common"); + jstlTCKCommonJar.add(new UrlAsset(Resources_en.class.getClassLoader().getResource(packagePathResources+"/AlgoResources_en_IE_EURO.properties")), packagePathResources+"/AlgoResources_en_IE_EURO.properties"); + jstlTCKCommonJar.add(new UrlAsset(Resources_en.class.getClassLoader().getResource(packagePathResources+"/AlgoResources.properties")), packagePathResources+"/AlgoResources.properties"); + return jstlTCKCommonJar; } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java index 22f81ca816..53b5521007 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java @@ -53,7 +53,7 @@ public static WebArchive createDeployment() throws IOException { WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_sql_query_web.war"); archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_sql_query_web.xml")); - + archive.addClasses(ResultSetQueryTag.class); archive.addAsWebInfResource(JSTLClientIT.class.getPackage(), "WEB-INF/resultSetQuery.tld", "resultSetQuery.tld"); archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryBodyContentTest.jsp")), "negativeQueryBodyContentTest.jsp"); diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties new file mode 100644 index 0000000000..55ed342d80 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties @@ -0,0 +1,18 @@ +# +# Copyright (c) 2018 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# Sample ResourceBundle properties file +mkey=default message diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties new file mode 100644 index 0000000000..ef3089eb53 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties @@ -0,0 +1,18 @@ +# +# Copyright (c) 2018 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 +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# Sample ResourceBundle properties file +mkey=en_IE_EURO message