Skip to content

Commit

Permalink
Fix test failures with jsp-api 4.0, delete tests of removed methods
Browse files Browse the repository at this point in the history
  • Loading branch information
alwin-joseph committed Jan 18, 2024
1 parent 2a3ec56 commit 5affad6
Show file tree
Hide file tree
Showing 8 changed files with 207 additions and 114 deletions.
82 changes: 74 additions & 8 deletions glassfish-runner/jsp-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<packaging>jar</packaging>

<properties>
<jakarta.platform.version>10.0.0</jakarta.platform.version>
<jakarta.platform.version>11.0.0-M1</jakarta.platform.version>
<junit.jupiter.version>5.9.1</junit.jupiter.version>
<tck.artifactId>jsp-tck</tck.artifactId>
<tck.artifactId>jakarta-pages-tck</tck.artifactId>
<tck.version>4.0.0</tck.version>
</properties>

Expand All @@ -42,14 +42,14 @@
</dependency>
<dependency>
<groupId>jakartatck</groupId>
<artifactId>jsp-tck</artifactId>
<version>10.0.0-SNAPSHOT</version>
<artifactId>${tck.artifactId}</artifactId>
<version>${tck.version}</version>
</dependency>
<dependency>
<!-- <dependency>
<groupId>org.glassfish.main.common</groupId>
<artifactId>simple-glassfish-api</artifactId>
<version>${glassfish.container.version}</version>
</dependency>
</dependency> -->
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-container</artifactId>
Expand Down Expand Up @@ -86,7 +86,72 @@

<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<goals>
<goal>wget</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<url>https://github.com/eclipse-ee4j/glassfish/releases/download/8.0.0-M1/glassfish-8.0.0-M1.zip</url>
<outputFileName>glassfish.zip</outputFileName>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<goals>
<goal>run</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<tasks>
<echo message="unzipping file"></echo>
<unzip dest="target/" src="target/glassfish.zip"></unzip>
<chmod dir="target/glassfish7/glassfish/bin/asadmin" perm="777"></chmod>
</tasks>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>unpack</id>
<goals>
<goal>unpack</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<artifactItems>
<artifactItem>
<groupId>jakartatck</groupId>
<artifactId>${tck.artifactId}</artifactId>
<version>${tck.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.2.0</version>
Expand All @@ -111,7 +176,8 @@
</configuration>
</execution>
</executions>
</plugin>
</plugin> -->

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand Down Expand Up @@ -277,7 +343,7 @@
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp-api.jar</additionalClasspathElement>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp.jstl-api.jar</additionalClasspathElement>
</additionalClasspathElements>
<dependenciesToScan>jakartatck:jsp-tck</dependenciesToScan>
<dependenciesToScan>jakartatck:${tck.artifactId}</dependenciesToScan>
<systemPropertyVariables>
<GLASSFISH_HOME>${project.build.directory}/${glassfish.toplevel.dir}</GLASSFISH_HOME>
<webServerHome>${project.build.directory}/${glassfish.toplevel.dir}/glassfish</webServerHome>
Expand Down
166 changes: 117 additions & 49 deletions jsp/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
{
Copyright (c) 2021 Contributors to the Eclipse Foundation
All rights reserved.
Expand All @@ -26,25 +26,59 @@
<version>10.0.0-SNAPSHOT</version>
</parent>

<artifactId>jsp-tck</artifactId>
<artifactId>jakarta-pages-tck</artifactId>
<version>4.0.0</version>
<packaging>jar</packaging>

<name>JSP</name>
<description>JSP</description>
<name>pages-tck</name>
<description>JSP TCK</description>

<properties>
<arquillian.junit>1.7.0.Alpha14</arquillian.junit>
<jakarta.annotation-api.version>3.0.0-M1</jakarta.annotation-api.version>
<jakarta.el-api.version>6.0.0-M2</jakarta.el-api.version>
<jakarta.mail-api.version>2.1.2</jakarta.mail-api.version>
<jakarta.servlet-api.version>6.1.0-M1</jakarta.servlet-api.version>
<jms-api.version>3.1.0</jms-api.version>
<jsp-api.version>4.0.0-M1</jsp-api.version>
<junit.jupiter.version>5.9.1</junit.jupiter.version>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>common</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>runtime</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>libutil</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>web-servlet</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>web-jsp</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>assembly</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>servlet</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>javatest</groupId>
Expand All @@ -53,28 +87,32 @@
<dependency>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<version>4.0.0-M1</version>
<version>${jsp-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>${jakarta.servlet-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta.annotation-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
<version>${jms-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
<version>6.0.0-M1</version>
<version>${jakarta.el-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
<version>${jakarta.mail-api.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -93,54 +131,84 @@
</dependency>
</dependencies>

<build>
<finalName>${bundle-name}-${project.version}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>LICENSE_${license}.md</include>
<include>com/</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>none</doclint>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>distribution</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
<escapeString>\</escapeString>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${bundle-name}-${project.version}</finalName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>17</release>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>tck-build</id>
<id>EFTL</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<bundle-name>jakarta-pages-tck</bundle-name>
<license>EFTL</license>
</properties>
</profile>
<profile>
<id>EPL</id>
<properties>
<bundle-name>pages-tck</bundle-name>
<license>EPL</license>
</properties>
</profile>
</profiles>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void jspExceptionCauseMessageCtorTest() throws Exception {
*
* @test_Strategy: Validate the behavior of JspException.getRootCause().
*/
@Test
// @Test
public void jspExceptionGetRootCauseTest() throws Exception {
TEST_PROPS.setProperty(APITEST, "jspExceptionGetRootCauseTest");
invoke();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ public void pageContextGetOutTest() throws Exception {
* PageContext.getExpressionEvaluator. Note: This is inherited
* from JspContext.
*/
@Test
//@Test
public void pageContextGetExpressionEvaluatorTest() throws Exception {
TEST_PROPS.setProperty(APITEST, "pageContextGetExpressionEvaluatorTest");
TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked");
Expand All @@ -659,7 +659,7 @@ public void pageContextGetExpressionEvaluatorTest() throws Exception {
* @test_Strategy: Validate the behavior of PageContext.getVariableResolver().
* Note: This is inherited from JspContext.
*/
@Test
// @Test
public void pageContextGetVariableResolverTest() throws Exception {
TEST_PROPS.setProperty(APITEST, "pageContextGetVariableResolverTest");
TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked");
Expand Down
Loading

0 comments on commit 5affad6

Please sign in to comment.