Skip to content

Commit

Permalink
fix failing 4 tests
Browse files Browse the repository at this point in the history
- use create-jvm-options to set properties
- add missed out property files to jstlTCKCommonJar
  • Loading branch information
alwin-joseph committed Nov 30, 2023
1 parent 883a91f commit 6ab0067
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 17 deletions.
61 changes: 53 additions & 8 deletions glassfish-runner/jstl-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,53 @@
</configuration>
</execution>
<execution>
<id>3-EnableTraceRequests</id>
<id>3-create-jvm-options</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</executable>
<arguments>
<argument>create-jvm-options</argument>
<argument>-Djavax.xml.accessExternalStylesheet=all</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>4-create-jvm-options</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</executable>
<arguments>
<argument>create-jvm-options</argument>
<argument>-Djavax.xml.accessExternalDTD=file,http</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>5-create-jvm-options</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</executable>
<arguments>
<argument>create-jvm-options</argument>
<argument>-Djavax.xml.accessExternalSchema=all</argument>
</arguments>
<successCodes>
<successCode>0</successCode>
<successCode>1</successCode>
</successCodes>
</configuration>
</execution>
<execution>
<id>6-EnableTraceRequests</id>
<goals>
<goal>exec</goal>
</goals>
Expand All @@ -169,7 +215,7 @@
</configuration>
</execution>
<execution>
<id>4-DeleteUser-j2ee</id>
<id>7-DeleteUser-j2ee</id>
<goals>
<goal>exec</goal>
</goals>
Expand All @@ -189,7 +235,7 @@
</configuration>
</execution>
<execution>
<id>5-AddUser-j2ee</id>
<id>8-AddUser-j2ee</id>
<goals>
<goal>exec</goal>
</goals>
Expand All @@ -207,7 +253,7 @@
</configuration>
</execution>
<execution>
<id>6-DeleteUser-javajoe</id>
<id>9-DeleteUser-javajoe</id>
<goals>
<goal>exec</goal>
</goals>
Expand All @@ -227,7 +273,7 @@
</configuration>
</execution>
<execution>
<id>7-AddUser-javajoe</id>
<id>A-AddUser-javajoe</id>
<goals>
<goal>exec</goal>
</goals>
Expand All @@ -245,7 +291,7 @@
</configuration>
</execution>
<execution>
<id>8-list-users</id>
<id>B-list-users</id>
<goals>
<goal>exec</goal>
</goals>
Expand All @@ -258,7 +304,7 @@
</configuration>
</execution>
<execution>
<id>9-StopDomain</id>
<id>C-StopDomain</id>
<goals>
<goal>exec</goal>
</goals>
Expand All @@ -272,7 +318,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6ab0067

Please sign in to comment.