You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2020/12/10 13:38:22 UTC

[tomee-tck] branch jakartaee9-tck updated: Merge some of EE 8 branch

This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch jakartaee9-tck
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git


The following commit(s) were added to refs/heads/jakartaee9-tck by this push:
     new d8011e5  Merge some of EE 8 branch
d8011e5 is described below

commit d8011e54f922bf64df6d016f99c019a322ad96ac
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Thu Dec 10 14:38:06 2020 +0100

    Merge some of EE 8 branch
---
 src/test/resources/testsuite.properties     |  2 ++
 src/test/tomcat/conf/context.xml            | 10 ++++++++--
 src/test/tomcat/conf/server.xml             |  4 ++--
 src/test/tomcat/conf/system.properties      |  1 +
 src/test/tomee-plume/conf/context.xml       |  7 ++++++-
 src/test/tomee-plume/conf/system.properties |  3 ++-
 src/test/tomee-plus/conf/context.xml        |  7 ++++++-
 src/test/tomee-plus/conf/server.xml         | 21 ++++++++-------------
 src/test/tomee-plus/conf/system.properties  |  3 ++-
 src/test/tomee/conf/context.xml             |  7 ++++++-
 src/test/tomee/conf/server.xml              | 21 ++++++++-------------
 src/test/tomee/conf/system.properties       |  3 ++-
 12 files changed, 53 insertions(+), 36 deletions(-)

diff --git a/src/test/resources/testsuite.properties b/src/test/resources/testsuite.properties
index 45a9218..ea68a9e 100644
--- a/src/test/resources/testsuite.properties
+++ b/src/test/resources/testsuite.properties
@@ -85,6 +85,8 @@ command.testExecuteEjbEmbed=com.sun.ts.lib.harness.ExecTSTestCmd \
         -DDB1.Password=${derby.passwd} \
         -DsingletonContainer=new://Container?type=SINGLETON&AccessTimeout=2minutes \
         -Dopenejb.embedded.remotable=true \
+        -Dopenejb.forceReadOnlyAppNamingContext=true \
+        -Djava.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory \
         -Dopenejb.deploymentId.format={appId}/{ejbJarId}/{ejbName} \
         -Dcts.tmp=$harness.temp.directory \
         -Djava.util.logging.config.file=${javaee.home}/domains/domain1/config/logging.properties \
diff --git a/src/test/tomcat/conf/context.xml b/src/test/tomcat/conf/context.xml
index 18a9e49..efa2dd5 100644
--- a/src/test/tomcat/conf/context.xml
+++ b/src/test/tomcat/conf/context.xml
@@ -16,7 +16,7 @@
   limitations under the License.
 -->
 <!-- The contents of this file will be loaded for each web application -->
-<Context crossContext="true" resourceOnlyServlets="jsp">
+<Context crossContext="true" resourceOnlyServlets="jsp" jndiExceptionOnFailedWrite="false">
   <CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" alwaysAddExpires="true" forwardSlashIsSeparator="false" />
   <!-- Default set of monitored resources. If one of these changes, the    -->
   <!-- web application will be reloaded.                                   -->
@@ -29,7 +29,13 @@
   <Manager pathname="" />
   -->
 
+    <Valve className="org.apache.openejb.cts.TransactionalWorkaroundLeakGuardValve"/>
+    <!-- Rollback this because it causes some other tests to fail because they test the Form authentication and Tomcat
+    Does not allow multiple authenticator valve
+    We need to hear back or to find a way to only add this for jaspic webapp or tests
+
   <Valve className="org.apache.catalina.authenticator.BasicAuthenticator"
-         jaspicCallbackHandlerClass="org.apache.tomee.security.provider.CallbackHandlerImpl"
+           jaspicCallbackHandlerClass="org.apache.openejb.cts.CallbackHandlerImpl"
   />
+    -->
 </Context>
diff --git a/src/test/tomcat/conf/server.xml b/src/test/tomcat/conf/server.xml
index 102a3a4..2fb19a8 100644
--- a/src/test/tomcat/conf/server.xml
+++ b/src/test/tomcat/conf/server.xml
@@ -115,14 +115,14 @@
 
       <!-- Use the LockOutRealm to prevent attempts to guess user passwords
            via a brute-force attack -->
-      <!--Realm className="org.apache.catalina.realm.LockOutRealm"-->
+      <Realm className="org.apache.catalina.realm.LockOutRealm">
         <!-- This Realm uses the UserDatabase configured in the global JNDI
              resources under the key "UserDatabase".  Any edits
              that are performed against this UserDatabase are immediately
              available for use by the Realm.  -->
         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                resourceName="UserDatabase"/>
-      <!--/Realm-->
+      </Realm>
 
       <Host name="localhost" appBase="webapps"
             unpackWARs="true" autoDeploy="true">
diff --git a/src/test/tomcat/conf/system.properties b/src/test/tomcat/conf/system.properties
index c654468..af52016 100644
--- a/src/test/tomcat/conf/system.properties
+++ b/src/test/tomcat/conf/system.properties
@@ -19,6 +19,7 @@ openejb.system.apps=true
 openejb.deployments.classpath=true
 tomee.remote.support=true
 openejb.embedded.remotable=true
+openejb.forceReadOnlyAppNamingContext=true
 
 RESOURCE.whitebox-notx-param|poolMaxSize=100
 RESOURCE.whitebox-notx|poolMaxSize=100
diff --git a/src/test/tomee-plume/conf/context.xml b/src/test/tomee-plume/conf/context.xml
index af628d5..484d69a 100644
--- a/src/test/tomee-plume/conf/context.xml
+++ b/src/test/tomee-plume/conf/context.xml
@@ -16,7 +16,7 @@
   limitations under the License.
 -->
 <!-- The contents of this file will be loaded for each web application -->
-<Context crossContext="true" resourceOnlyServlets="jsp">
+<Context crossContext="true" resourceOnlyServlets="jsp" jndiExceptionOnFailedWrite="false">
     <CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" alwaysAddExpires="true" forwardSlashIsSeparator="false" />
     <!-- Default set of monitored resources. If one of these changes, the    -->
     <!-- web application will be reloaded.                                   -->
@@ -30,7 +30,12 @@
     -->
 
     <Valve className="org.apache.openejb.cts.TransactionalWorkaroundLeakGuardValve"/>
+    <!-- Rollback this because it causes some other tests to fail because they test the Form authentication and Tomcat
+    Does not allow multiple authenticator valve
+    We need to hear back or to find a way to only add this for jaspic webapp or tests
+
     <Valve className="org.apache.catalina.authenticator.BasicAuthenticator"
            jaspicCallbackHandlerClass="org.apache.openejb.cts.CallbackHandlerImpl"
     />
+    -->
 </Context>
diff --git a/src/test/tomee-plume/conf/system.properties b/src/test/tomee-plume/conf/system.properties
index d8961aa..1538831 100644
--- a/src/test/tomee-plume/conf/system.properties
+++ b/src/test/tomee-plume/conf/system.properties
@@ -28,6 +28,7 @@ openejb.deployments.classpath=true
 tomee.remote.support=true
 openejb.embedded.remotable=true
 openejb.environment.default=true
+openejb.forceReadOnlyAppNamingContext=true
 
 RESOURCE.whitebox-notx-param|poolMaxSize=100
 RESOURCE.whitebox-notx|poolMaxSize=100
@@ -139,7 +140,7 @@ app/env/appds.UserName=cts
 app/env/appds.Password=cts
 
 openejb.classloader.forced-load = com.sun.ts.tests.
-openejb.classloader.forced-skip=com.sun.ts.tests.jaspic.tssv.util.
+openejb.classloader.forced-skip=com.sun.ts.tests.jaspic.tssv.
 
 # not sure why we have to duplicate this one here
 log.file.location=%user.dir%/%openejb.home%/logs
diff --git a/src/test/tomee-plus/conf/context.xml b/src/test/tomee-plus/conf/context.xml
index af628d5..484d69a 100644
--- a/src/test/tomee-plus/conf/context.xml
+++ b/src/test/tomee-plus/conf/context.xml
@@ -16,7 +16,7 @@
   limitations under the License.
 -->
 <!-- The contents of this file will be loaded for each web application -->
-<Context crossContext="true" resourceOnlyServlets="jsp">
+<Context crossContext="true" resourceOnlyServlets="jsp" jndiExceptionOnFailedWrite="false">
     <CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" alwaysAddExpires="true" forwardSlashIsSeparator="false" />
     <!-- Default set of monitored resources. If one of these changes, the    -->
     <!-- web application will be reloaded.                                   -->
@@ -30,7 +30,12 @@
     -->
 
     <Valve className="org.apache.openejb.cts.TransactionalWorkaroundLeakGuardValve"/>
+    <!-- Rollback this because it causes some other tests to fail because they test the Form authentication and Tomcat
+    Does not allow multiple authenticator valve
+    We need to hear back or to find a way to only add this for jaspic webapp or tests
+
     <Valve className="org.apache.catalina.authenticator.BasicAuthenticator"
            jaspicCallbackHandlerClass="org.apache.openejb.cts.CallbackHandlerImpl"
     />
+    -->
 </Context>
diff --git a/src/test/tomee-plus/conf/server.xml b/src/test/tomee-plus/conf/server.xml
index 554c927..3b80e3e 100644
--- a/src/test/tomee-plus/conf/server.xml
+++ b/src/test/tomee-plus/conf/server.xml
@@ -70,10 +70,7 @@
     -->
     <Connector port="%webcontainer.default.port%" protocol="HTTP/1.1"
                connectionTimeout="20000"
-               allowedTrailerHeaders="myTrailer, myTrailer2"
-               redirectPort="%webcontainer.default.ssl.port%">
-      <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
-    </Connector>
+               redirectPort="%webcontainer.default.ssl.port%"/>
     <!-- A "Connector" using the shared thread pool-->
     <!--
     <Connector executor="tomcatThreadPool"
@@ -85,13 +82,11 @@
          This connector uses the JSSE configuration, when using APR, the
          connector should be using the OpenSSL style configuration
          described in the APR documentation -->
-    <Connector port="%webcontainer.default.ssl.port%" protocol="HTTP/1.1" SSLEnabled="true">
-      <SSLHostConfig truststoreFile="conf/ssl-truststore">
-        <Certificate certificateKeystoreFile="conf/clientcert.jks"
-                     certificateKeystorePassword="changeit"
-                     type="RSA" />
-      </SSLHostConfig>
-    </Connector>
+    <Connector port="%webcontainer.default.ssl.port%" protocol="HTTP/1.1" SSLEnabled="true"
+               maxThreads="150" scheme="https" secure="true"
+               clientAuth="false" sslProtocol="TLS"
+               keystoreFile="conf/clientcert.jks" keystorePass="changeit" keyAlias="cts"
+               truststoreFile="conf/ssl-truststore" truststorePass="changeit"/>
 
     <!-- Define an AJP 1.3 Connector on port 8009 -->
     <!-- <Connector port="%tomee.ajp.port%" protocol="AJP/1.3" redirectPort="%tomee.ssl.port%" /> -->
@@ -117,14 +112,14 @@
 
       <!-- Use the LockOutRealm to prevent attempts to guess user passwords
            via a brute-force attack -->
-      <!--Realm className="org.apache.catalina.realm.LockOutRealm"-->
+      <Realm className="org.apache.catalina.realm.LockOutRealm">
         <!-- This Realm uses the UserDatabase configured in the global JNDI
              resources under the key "UserDatabase".  Any edits
              that are performed against this UserDatabase are immediately
              available for use by the Realm.  -->
         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                resourceName="UserDatabase"/>
-      <!--/Realm-->
+      </Realm>
 
       <Host name="localhost" appBase="webapps"
             unpackWARs="true" autoDeploy="true">
diff --git a/src/test/tomee-plus/conf/system.properties b/src/test/tomee-plus/conf/system.properties
index 46efb76..d57a359 100644
--- a/src/test/tomee-plus/conf/system.properties
+++ b/src/test/tomee-plus/conf/system.properties
@@ -28,6 +28,7 @@ openejb.deployments.classpath=true
 tomee.remote.support=true
 openejb.embedded.remotable=true
 openejb.environment.default=true
+openejb.forceReadOnlyAppNamingContext=true
 
 RESOURCE.whitebox-notx-param|poolMaxSize=100
 RESOURCE.whitebox-notx|poolMaxSize=100
@@ -132,7 +133,7 @@ app/env/appds.UserName=cts
 app/env/appds.Password=cts
 
 openejb.classloader.forced-load = com.sun.ts.tests.
-openejb.classloader.forced-skip=com.sun.ts.tests.jaspic.tssv.util.
+openejb.classloader.forced-skip=com.sun.ts.tests.jaspic.tssv.
 
 # not sure why we have to duplicate this one here
 log.file.location=%user.dir%/%openejb.home%/logs
diff --git a/src/test/tomee/conf/context.xml b/src/test/tomee/conf/context.xml
index af628d5..484d69a 100644
--- a/src/test/tomee/conf/context.xml
+++ b/src/test/tomee/conf/context.xml
@@ -16,7 +16,7 @@
   limitations under the License.
 -->
 <!-- The contents of this file will be loaded for each web application -->
-<Context crossContext="true" resourceOnlyServlets="jsp">
+<Context crossContext="true" resourceOnlyServlets="jsp" jndiExceptionOnFailedWrite="false">
     <CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" alwaysAddExpires="true" forwardSlashIsSeparator="false" />
     <!-- Default set of monitored resources. If one of these changes, the    -->
     <!-- web application will be reloaded.                                   -->
@@ -30,7 +30,12 @@
     -->
 
     <Valve className="org.apache.openejb.cts.TransactionalWorkaroundLeakGuardValve"/>
+    <!-- Rollback this because it causes some other tests to fail because they test the Form authentication and Tomcat
+    Does not allow multiple authenticator valve
+    We need to hear back or to find a way to only add this for jaspic webapp or tests
+
     <Valve className="org.apache.catalina.authenticator.BasicAuthenticator"
            jaspicCallbackHandlerClass="org.apache.openejb.cts.CallbackHandlerImpl"
     />
+    -->
 </Context>
diff --git a/src/test/tomee/conf/server.xml b/src/test/tomee/conf/server.xml
index 554c927..3b80e3e 100644
--- a/src/test/tomee/conf/server.xml
+++ b/src/test/tomee/conf/server.xml
@@ -70,10 +70,7 @@
     -->
     <Connector port="%webcontainer.default.port%" protocol="HTTP/1.1"
                connectionTimeout="20000"
-               allowedTrailerHeaders="myTrailer, myTrailer2"
-               redirectPort="%webcontainer.default.ssl.port%">
-      <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
-    </Connector>
+               redirectPort="%webcontainer.default.ssl.port%"/>
     <!-- A "Connector" using the shared thread pool-->
     <!--
     <Connector executor="tomcatThreadPool"
@@ -85,13 +82,11 @@
          This connector uses the JSSE configuration, when using APR, the
          connector should be using the OpenSSL style configuration
          described in the APR documentation -->
-    <Connector port="%webcontainer.default.ssl.port%" protocol="HTTP/1.1" SSLEnabled="true">
-      <SSLHostConfig truststoreFile="conf/ssl-truststore">
-        <Certificate certificateKeystoreFile="conf/clientcert.jks"
-                     certificateKeystorePassword="changeit"
-                     type="RSA" />
-      </SSLHostConfig>
-    </Connector>
+    <Connector port="%webcontainer.default.ssl.port%" protocol="HTTP/1.1" SSLEnabled="true"
+               maxThreads="150" scheme="https" secure="true"
+               clientAuth="false" sslProtocol="TLS"
+               keystoreFile="conf/clientcert.jks" keystorePass="changeit" keyAlias="cts"
+               truststoreFile="conf/ssl-truststore" truststorePass="changeit"/>
 
     <!-- Define an AJP 1.3 Connector on port 8009 -->
     <!-- <Connector port="%tomee.ajp.port%" protocol="AJP/1.3" redirectPort="%tomee.ssl.port%" /> -->
@@ -117,14 +112,14 @@
 
       <!-- Use the LockOutRealm to prevent attempts to guess user passwords
            via a brute-force attack -->
-      <!--Realm className="org.apache.catalina.realm.LockOutRealm"-->
+      <Realm className="org.apache.catalina.realm.LockOutRealm">
         <!-- This Realm uses the UserDatabase configured in the global JNDI
              resources under the key "UserDatabase".  Any edits
              that are performed against this UserDatabase are immediately
              available for use by the Realm.  -->
         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                resourceName="UserDatabase"/>
-      <!--/Realm-->
+      </Realm>
 
       <Host name="localhost" appBase="webapps"
             unpackWARs="true" autoDeploy="true">
diff --git a/src/test/tomee/conf/system.properties b/src/test/tomee/conf/system.properties
index 8ccf9af..0556ad0 100644
--- a/src/test/tomee/conf/system.properties
+++ b/src/test/tomee/conf/system.properties
@@ -28,6 +28,7 @@ openejb.deployments.classpath=true
 tomee.remote.support=true
 openejb.embedded.remotable=true
 openejb.environment.default=true
+openejb.forceReadOnlyAppNamingContext=true
 
 RESOURCE.whitebox-notx-param|poolMaxSize=100
 RESOURCE.whitebox-notx|poolMaxSize=100
@@ -132,7 +133,7 @@ app/env/appds.UserName=cts
 app/env/appds.Password=cts
 
 openejb.classloader.forced-load = com.sun.ts.tests.
-openejb.classloader.forced-skip=com.sun.ts.tests.jaspic.tssv.util.
+openejb.classloader.forced-skip=org.apache.derby.,com.sun.ts.tests.jaspic.tssv.
 
 # not sure why we have to duplicate this one here
 log.file.location=%user.dir%/%openejb.home%/logs