eclipse-ee4j / jakartaee-tck-tools

Other
7 stars 15 forks source link

tck-rewrite is not transforming tests under jjms/src/main/java/com/sun/ts/tests/jms/core #117

Closed starksm64 closed 3 weeks ago

starksm64 commented 3 weeks ago

None of the tests under the jms/src/main/java/com/sun/ts/tests/jms/core module are getting transformed. Tests under jms/src/main/java/com/sun/ts/tests/jms/core20 and other trees are, but none of the jms/src/main/java/com/sun/ts/tests/jms/core tests are. They follow a different

jms/src/main/java/com/sun/ts/tests/jms/core/appclient/closedQueueConnection/ClosedQueueConnectionTests.java jms/src/main/java/com/sun/ts/tests/jms/core/appclient/closedQueueReceiver/ClosedQueueReceiverTests.java jms/src/main/java/com/sun/ts/tests/jms/core/bytesMsgQueue/BytesMsgQueueTests.java etc.

This is as opposed to the Client*Test.java in other parts of the module. I'm guessing that there is a filter on the name.

starksm64 commented 3 weeks ago

There is this check in tck.jakarta.platform.rewrite.GenerateNewTestClassRecipe

            boolean isTest = classDecl.getSimpleName().contains("Client"); // this will match too much but still try
            if (!isTest) {
                log.fine("ignore non-test class " + classDecl.getSimpleName());
                return classDecl;
            }

If I run the conversion with fine logging enabled, it looks like about 43 test classes are not being transformed:

[starksm@scottryzen jms]$ grep 'ignore non-test class' /tmp/tck.log >/tmp/ignore.log
[starksm@scottryzen jms]$ vi /tmp/ignore.log 
[starksm@scottryzen jms]$ wc /tmp/ignore.log 
 108  540 4891 /tmp/ignore.log
[starksm@scottryzen jms]$ grep Tests /tmp/ignore.log | wc
     43     215    2059
[starksm@scottryzen jms]$ head /tmp/ignore.log 
FINE: ignore non-test class ClosedQueueConnectionTests
FINE: ignore non-test class ClosedQueueReceiverTests
FINE: ignore non-test class ClosedQueueSessionTests
FINE: ignore non-test class ClosedTopicConnectionTests
FINE: ignore non-test class ClosedTopicSessionTests
FINE: ignore non-test class InvalidDestTests
FINE: ignore non-test class QueueConnTests
FINE: ignore non-test class QueueTests
FINE: ignore non-test class TopicTests
FINE: ignore non-test class TxQueueTests

We should also be checking for any class name ending in Tests in addition to containing Client.