funky-eyes opened a new issue, #7932: URL: https://github.com/apache/incubator-seata/issues/7932
### Check Ahead - [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate. - [ ] I am willing to try to fix this bug myself. ### Ⅰ. Issue Description ``` Error: org.apache.seata.sqlparser.druid.DruidSQLRecognizerFactoryTest.testIsSqlSyntaxSupports Time elapsed: 0.113 s <<< FAILURE! org.opentest4j.AssertionFailedError: Unexpected exception type thrown ==> expected: <org.apache.seata.common.exception.NotSupportYetException> but was: <java.lang.ClassCastException> at org.apache.seata.sqlparser.druid.DruidSQLRecognizerFactoryTest.testIsSqlSyntaxSupports(DruidSQLRecognizerFactoryTest.java:167) Caused by: java.lang.ClassCastException: com.alibaba.druid.sql.ast.statement.SQLSelectQueryBlock cannot be cast to com.alibaba.druid.sql.dialect.oscar.ast.stmt.OscarSelectQueryBlock at org.apache.seata.sqlparser.druid.DruidSQLRecognizerFactoryTest.lambda$testIsSqlSyntaxSupports$14(DruidSQLRecognizerFactoryTest.java:168) at org.apache.seata.sqlparser.druid.DruidSQLRecognizerFactoryTest.testIsSqlSyntaxSupports(DruidSQLRecognizerFactoryTest.java:167) ``` https://github.com/apache/incubator-seata/actions/runs/20950751267/job/60203295241 We need to extract this assertion into its own separate test case: ``` JavaAssertions.assertThrows( NotSupportYetException.class, () -> recognizerFactory.create(sql2, JdbcConstants.OSCAR) ); ``` and ensure this test only runs on Druid 1.2.5 and higher versions. The reason is that starting from Druid 1.2.5, the SQL parser returns an OscarSelectQueryBlock for OSCAR database queries, while all earlier versions return the generic SQLSelectQueryBlock. This indicates that proper support for the OSCAR database was introduced in Druid 1.2.5. ### Ⅱ. Describe what happened _No response_ ### Ⅲ. Describe what you expected to happen _No response_ ### Ⅳ. How to reproduce it (as minimally and precisely as possible) _No response_ ### Ⅴ. Anything else we need to know? _No response_ ### Ⅵ. Environment _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
