Running
Tomcat
Set the following system properties
- org.apache.tomcat.websocket.DISABLE_BUILTIN_EXTENSIONS=true
- org.apache.tomcat.websocket.ALLOW_UNSUPPORTED_EXTENSIONS=true
- org.apache.tomcat.websocket.DEFAULT_PROCESS_PERIOD=0
Test Suite
Download the Jakarta WebSocket 2.0 TCK
https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee9/promoted/websocket-tck-2.0.0.zip
Extract to WEBSOCKET_TCK_HOME
Edit $WEBSOCKET_TCK_HOME/bin/ts.jte
You'll need to set the following properties (adjust the paths and values for your environment)
webServerHost=localhost
webServerPort=8080
securedWebServicePort=8443
websocket.api=/home/mark/repos/asf-public/tomcat/trunk/output/build/lib/websocket-api.jar
websocket.classes=/home/mark/repos/asf-public/tomcat/trunk/output/build/lib/tomcat-websocket.jar:/home/mark/repos/asf-public/tomcat/trunk/output/build/lib/servlet-api.jar:/home/mark/repos/asf-public/tomcat/trunk/output/build/lib/tomcat-util.jar:/home/mark/repos/asf-public/tomcat/trunk/output/build/lib/tomcat-api.jar:/home/mark/repos/asf-public/tomcat/trunk/output/build/bin/tomcat-juli.jar
Add the following to the command.testExecute property (to prevent entropy issues slowing the tests down)
-Djava.security.egd=file:/dev/./urandom
Do not reduce ws_wait below the default of 5s as it is likely to trigger test failures.
set JAVA_HOME
Run ant gui
Accept the defaults and then run the tests
Expected results (Jakarta EE 9)
A default 10.0.x build (as of 10.0.5) running with the 2.0.1 TCK build triggers 0 test failures with the following JRE(s):
- Adopt OpenJDK 11.0.9 b11 (TCK and Tomcat)
5 Tests 'fixed' by appropriate system property configuration (see above).
- 4 x extensions (TCK assumes invalid extensions are ignored)
Consider making TCK smarter so it ignores other extensions the server may advertise. Better still, detect them first and then exclude them from this test.
Need to discuss expected behaviour if an unknown extension is specified. Are these required or optional? - 1 x timeout related test expects more frequent expiration checks