eclipse-ee4j / jakartaee-tck-tools

Other
7 stars 15 forks source link

Remove @Tag("web") from generated tests that use `@OverProtocol("appclient")` #148

Open scottmarlow opened 4 hours ago

scottmarlow commented 4 hours ago

https://github.com/jakartaee/platform-tck/blob/main/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientEjbTest.java incorrectly includes the @Tag("web") which is wrong since the web profile should not use the appclient protocol since Web Profile does not support App Client.

From the generated jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientEjbTest.java:

@Tag("jta")
@Tag("platform")
@Tag("web")
@Tag("tck-appclient")
.
.
.
    @TargetsContainer("tck-appclient")
    @OverProtocol("appclient")

From the keywords.properties

com/sun/ts/tests/jta = jta javaee javaee_web_profile com/sun/ts/tests/jta/ee/txpropagationtest = jta javaee com/sun/ts/tests/jta/ee/usertransaction = jta javaee javaee_web_profile

scottmarlow commented 4 hours ago

There are some in jms like StreamMsgQueueTestsEjbTest.java:

@Tag("jms") @Tag("platform") @Tag("jms_web") @Tag("web_optional") @Tag("tck-appclient") ... @OverProtocol("appclient")

We probably don't have to use automation to fix these but that would be nice also. I think we should remove the jms_web but not sure about the web_optional. We could remove web_optional though since there are no optional technologies currently in the EE 11 Platform.

arjantijms commented 3 hours ago

(slightly offtopic, but now I notice it here: when possible and it doesn't mean extra work, we should use "messaging" or "jakarta_messaging" instead of "jms")

scottmarlow commented 3 hours ago

Something like the following could be updated to identify files that shouldn't contain the web (or jms_web) tag and remove the web tag via sed: grep -rl "@OverProtocol(\"appclient\")" --include=.java | xargs grep -ril "@Tag.\"web\"" grep -rl "@OverProtocol(\"appclient\")" --include=.java | xargs grep -ril "@Tag.\"jms_web\""