This is an automated email from the ASF dual-hosted git repository.
jlmonteiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git
The following commit(s) were added to refs/heads/master by this push:
new 8177809 Backport from Jakarta EE 9 branch
8177809 is described below
commit 8177809527b86bc25ca810eb9fa7c7535f17b09c
Author: Jean-Louis Monteiro <[email protected]>
AuthorDate: Mon Apr 12 10:30:20 2021 +0200
Backport from Jakarta EE 9 branch
Signed-off-by: Jean-Louis Monteiro <[email protected]>
---
.../java/org/apache/openejb/cts/CallbackHandlerImpl.java | 2 +-
.../org/apache/openejb/cts/deploy/StandardDeployment14.java | 10 ++++++++--
src/test/resources/testsuite.properties | 4 +---
src/test/script/openejb/tck/commands/JavaTestCommand.groovy | 5 +++--
src/test/script/openejb/tck/commands/ValidateCommand.groovy | 12 ++++++++++++
src/test/tomee-plume/conf/system.properties | 6 ++++++
src/test/tomee-plume/conf/tomee.xml | 4 +---
src/test/tomee-plus/conf/tomee.xml | 7 +++++++
src/test/tomee/conf/tomee.xml | 7 +++++++
9 files changed, 46 insertions(+), 11 deletions(-)
diff --git a/src/main/java/org/apache/openejb/cts/CallbackHandlerImpl.java
b/src/main/java/org/apache/openejb/cts/CallbackHandlerImpl.java
index 6cba847..75d5fb2 100644
--- a/src/main/java/org/apache/openejb/cts/CallbackHandlerImpl.java
+++ b/src/main/java/org/apache/openejb/cts/CallbackHandlerImpl.java
@@ -58,7 +58,7 @@ public class CallbackHandlerImpl implements CallbackHandler,
Contained {
@Override
- public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
+ public void handle(final Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
String name = null;
Principal principal = null;
diff --git
a/src/main/java/org/apache/openejb/cts/deploy/StandardDeployment14.java
b/src/main/java/org/apache/openejb/cts/deploy/StandardDeployment14.java
index 8145bca..1f3501f 100644
--- a/src/main/java/org/apache/openejb/cts/deploy/StandardDeployment14.java
+++ b/src/main/java/org/apache/openejb/cts/deploy/StandardDeployment14.java
@@ -293,8 +293,14 @@ public class StandardDeployment14 implements
TSDeploymentInterface {
}
} catch (Exception e) {
e.printStackTrace();
- throw (TSDeploymentException) new TSDeploymentException(
- "Deployment Failed.").initCause(e);
+
+ // just print the details of the failure but don't interrupt the tests
+ // leave the test eventually fail if deployment is not available
+ // some tests like in WebSocket are explicitly testing deployment
failures
+
+// throw (TSDeploymentException) new TSDeploymentException(
+// "Deployment Failed.").initCause(e);
+ return "";
}
}
diff --git a/src/test/resources/testsuite.properties
b/src/test/resources/testsuite.properties
index d2f4f1f..4c946b6 100644
--- a/src/test/resources/testsuite.properties
+++ b/src/test/resources/testsuite.properties
@@ -89,7 +89,6 @@
command.testExecuteEjbEmbed=com.sun.ts.lib.harness.ExecTSTestCmd \
-Djava.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory
\
-Dopenejb.deploymentId.format={appId}/{ejbJarId}/{ejbName} \
-Dcts.tmp=$harness.temp.directory \
-
-Dtest.ejb.stateful.timeout.wait.seconds=${test.ejb.stateful.timeout.wait.seconds}
\
-Djava.util.logging.config.file=${javaee.home}/domains/domain1/config/logging.properties
\
-Ddeliverable.class=${deliverable.class} \
$testExecuteClass \
@@ -222,8 +221,7 @@ whitebox-embed-xa=java:comp/env/eis/ejb_Tsr_whitebox-xa.rar
securedWebServicePort=%webcontainer.default.ssl.port%
-# timeout configuration is 4 minutes so we should be good
-test.ejb.stateful.timeout.wait.seconds=180
+test.ejb.stateful.timeout.wait.seconds=660
harness.log.port=%harness.log.port%
diff --git a/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
b/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
index 3d1ed81..1b698dc 100644
--- a/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
+++ b/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
@@ -239,13 +239,14 @@ class JavaTestCommand
log.info("Enabling server security manager")
// -Djava.security.properties=conf/security.properties
- containerJavaOpts += " -Djava.security.manager
-Djava.security.policy==${project.basedir}/${openejbHome}/conf/catalina.policy"
+ containerJavaOpts += "-Djava.security.manager " +
+
"-Djava.security.policy==${project.basedir}/${openejbHome}/conf/catalina.policy
" +
+
"-Djava.security.properties=${project.basedir}/${openejbHome}/conf/security.properties"
}
if (options.contains('websocket')) {
log.info("Enabling Tomcat WebSockets configuration")
containerJavaOpts += "
-Dorg.apache.tomcat.websocket.DISABLE_BUILTIN_EXTENSIONS=true " +
"-Dorg.apache.tomcat.websocket.ALLOW_UNSUPPORTED_EXTENSIONS=true " +
-
"-Dorg.apache.tomcat.websocket.STRICT_SPEC_COMPLIANCE=true " +
"-Dorg.apache.tomcat.websocket.DEFAULT_PROCESS_PERIOD=0"
}
if (containerJavaOpts != null) {
diff --git a/src/test/script/openejb/tck/commands/ValidateCommand.groovy
b/src/test/script/openejb/tck/commands/ValidateCommand.groovy
index eb7a95d..6521aca 100644
--- a/src/test/script/openejb/tck/commands/ValidateCommand.groovy
+++ b/src/test/script/openejb/tck/commands/ValidateCommand.groovy
@@ -70,6 +70,18 @@ class ValidateCommand
log.info("Using $it: $dir")
}
+ def tckHome = new File(project.properties.getProperty('cts.home'))
+ def infoTxt = new File(tckHome, "info.txt")
+ if (infoTxt.exists()) {
+ def content = IO.slurp(infoTxt)
+ log.info(content)
+ }
+
+ def sha = new File(tckHome, "sha256")
+ if (sha.exists()) {
+ def content = IO.slurp(sha)
+ log.info("TCK SHA-256 " + content)
+ }
}
}
diff --git a/src/test/tomee-plume/conf/system.properties
b/src/test/tomee-plume/conf/system.properties
index 89d57ed..180a59a 100644
--- a/src/test/tomee-plume/conf/system.properties
+++ b/src/test/tomee-plume/conf/system.properties
@@ -21,6 +21,12 @@ org.apache.tomcat.websocket.DISABLE_BUILTIN_EXTENSIONS=true
org.apache.tomcat.websocket.ALLOW_UNSUPPORTED_EXTENSIONS=true
org.apache.tomcat.websocket.DEFAULT_PROCESS_PERIOD=0
org.apache.tomcat.websocket.STRICT_SPEC_COMPLIANCE=true
+#org.apache.webbeans.generator.proxyReservedPackages =
java,javax,sun.misc,jakarta
+
+tomee.tomcat.instance-manager.skip-cdi=com.sun.ts.tests.servlet.api.jakarta_servlet.servletcontext30.BadServlet,\
+ com.sun.ts.tests.servlet.api.jakarta_servlet.servletcontext30.BadFilter,\
+ com.sun.ts.tests.servlet.api.jakarta_servlet.servletcontext30.BadListener
+
user.language=en
user.country=US
diff --git a/src/test/tomee-plume/conf/tomee.xml
b/src/test/tomee-plume/conf/tomee.xml
index 90f45b3..70b638e 100644
--- a/src/test/tomee-plume/conf/tomee.xml
+++ b/src/test/tomee-plume/conf/tomee.xml
@@ -28,9 +28,7 @@
<Container id="StatefulContainer" ctype="STATEFUL">
Passivator org.apache.openejb.core.stateful.SimplePassivater
- #TimeOut 20
- TimeOut 4
- Frequency 10
+ TimeOut 20
BulkPassivate 50
</Container>
diff --git a/src/test/tomee-plus/conf/tomee.xml
b/src/test/tomee-plus/conf/tomee.xml
index 31eeeee..55228a5 100644
--- a/src/test/tomee-plus/conf/tomee.xml
+++ b/src/test/tomee-plus/conf/tomee.xml
@@ -50,6 +50,13 @@
<!--</Container>-->
<!-- That should be also specified in the system.properties file of the
target environment -->
+ <Resource id="jdbc/securityAPIDB" type="DataSource">
+ JdbcDriver org.apache.derby.jdbc.ClientDriver
+ JdbcUrl jdbc:derby://localhost:%derby.server.port%/derbydb;create=true
+ UserName cts
+ Password cts
+ </Resource>
+
<Resource id="jdbc/DB1" type="DataSource">
JdbcDriver org.apache.derby.jdbc.ClientDriver
JdbcUrl jdbc:derby://localhost:%derby.server.port%/derbydb;create=true
diff --git a/src/test/tomee/conf/tomee.xml b/src/test/tomee/conf/tomee.xml
index 31eeeee..55228a5 100644
--- a/src/test/tomee/conf/tomee.xml
+++ b/src/test/tomee/conf/tomee.xml
@@ -50,6 +50,13 @@
<!--</Container>-->
<!-- That should be also specified in the system.properties file of the
target environment -->
+ <Resource id="jdbc/securityAPIDB" type="DataSource">
+ JdbcDriver org.apache.derby.jdbc.ClientDriver
+ JdbcUrl jdbc:derby://localhost:%derby.server.port%/derbydb;create=true
+ UserName cts
+ Password cts
+ </Resource>
+
<Resource id="jdbc/DB1" type="DataSource">
JdbcDriver org.apache.derby.jdbc.ClientDriver
JdbcUrl jdbc:derby://localhost:%derby.server.port%/derbydb;create=true