-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
websocket test refactor with Junit and arquillian #1160
websocket test refactor with Junit and arquillian #1160
Conversation
af11cd8
to
5779ac7
Compare
is it using arquilian? |
Yes, it uses arquillian and junit5. |
5779ac7
to
ca44da2
Compare
great. I will have a try next week with Jetty. |
11515ae
to
a323f8b
Compare
2783063
to
3791851
Compare
3791851
to
ba6977f
Compare
Please have a look at this PR https://github.com/gurunrao/jakartaee-tck/pull/8 |
...n/java/com/sun/ts/tests/websocket/api/jakarta/websocket/clientendpointconfig/WSClientIT.java
Show resolved
Hide resolved
why renaming all classes to |
fail-safe plugin default inclusion wildcards are as follows: |
The host:port were configured in jtest and harness TCK (https://github.com/jakartaee/platform-tck/blob/master/install/websocket/bin/ts.jte#L177), we intend to keep the functionality as before. |
Yes but now with Arquillian this works totally different and the change from the PR must be applied. I have tested with gf runner and this works. This has been done as this with servlet tck as this is simply using the hardcoded port return by Arquillian GH container. If not changed there jetty or any arquillian container using random port will not being able to use this TCK code. cc @starksm64 |
I don't like this. |
Port is configured using properties file and not hardcoded. |
No, it is definitely hardcoded in the pom. |
https://github.com/gurunrao/jakartaee-tck/pull/8 - doesn't take care of secure ports |
The example of gurunrao#8 shows how it works with a default deployment. @ArquillianResource
@OperateOnDeployment("_DEFAULT_")
public URL url; Take the Servlet world, for example, if the need is for an Arquillian operation with a secure port, then it is accessed with a operational name. platform-tck/servlet/src/main/java/com/sun/ts/tests/servlet/spec/security/clientcertanno/Client.java Lines 63 to 64 in 5d9911b
and used like ... platform-tck/servlet/src/main/java/com/sun/ts/tests/servlet/spec/security/clientcertanno/Client.java Lines 112 to 113 in 5d9911b
Which would be needed in only one websocket test class ... |
Some feedback from testing this with Tomcat. First the big plus in the improved speed. Tests execute much faster with the entire suite complete in just over 3 minutes. It took a little while to figure out how to configure the TCK to run with Tomcat but now I have figured that it it will be easy to maintain going forward and to potentially feed into CI systems to run the TCK more regularly. I am currently seeing a small number (three) of test failures. I need to look into these to figure out if it is my configuration of the test suite that is still not quite right or if something else is going on. |
There does appear to be a concurrency issue with the refactored tests. A number of the tests define I'm not sure what the "right" fix is but configuring the tests to run with I'm still seeing a couple of timeout tests fail but at the moment I think this is a Tomcat configuration issue. |
It isn't a Tomcat issue. The root cause is the same as the other failures. The problem is that That has resolved the failures I was seeing but it looks like one of the timeout tests is now failing further on. I'm still investigating. |
Woot! The remaining issues were configuration (I'd forgotten a system property needed to ensure the timeouts fire promptly enough for the tests) and a Tomact bug caused by a recent refactoring. All 736 tests are now passing which is consistent with the old TCK tests that had 737 tests (including the signature test which hasn't been refactored yet). |
@gurunrao please read my comment here #1182 (comment) |
ba6977f
to
b4d640a
Compare
I have made necessary changes as per comments, the ssl port auto-detection is not getting detected. |
@olamy @joakime any suggestions on SSL port auto-detection working? |
@gurunrao I'm on holidays. I can have a look next week. as you can see there is the default
and then the
And you reference this as is in your test. platform-tck/servlet/src/main/java/com/sun/ts/tests/servlet/spec/security/clientcert/Client.java Line 73 in 644743f
|
We should consider asking on Websocket dev mailing list if the Standalone WebSocket TCK tests should move to the WebSocket spec. I see that Mark Thomas is here helping already but its not too early to discuss moving the WebSocket TCK work to the Specification. We started that conversation recently on the Servlet mailing list. |
b4d640a
to
a304a54
Compare
https://github.com/gurunrao/jakartaee-tck/blob/tck-refactor-websocket-2/glassfish-runner/websocket-platform-tck/src/test/resources/arquillian.xml#L10 has details on container. |
a304a54
to
a8cb388
Compare
if there are no new review comments,I am planning to merge the PR. |
I will not debug the auto detection of SSL further, Since we have system properties and @olamy suggested SSL port auto-detection might be issue with glassfish arquillian. |
Signed-off-by: Gurunandan Rao <[email protected]>
a8cb388
to
868fa0b
Compare
Websocket Platform TCK and Standalone TCK test refactor using Junit and arquillian.
Standalone Test results:
Platform Test results: