YongGoose commented on PR #7456: URL: https://github.com/apache/incubator-seata/pull/7456#issuecomment-2991270073
> The main problem we need to solve is that the REPLACE statement in the test class is not supported and throws a ParserException, which causes a Maven build error. > > My solution: Modify DruidSQLRecognizerFactoryImpl.java and convert Druid's ParserException to Seata's NotSupportYetException. > > At the same time, in order to take into account the previous test class, use reflection to check the exception type and avoid directly referencing ParserException > > Result: GitHub Action builds successfully Unified exception handling - all unsupported SQL syntax throws NotSupportYetException Consistent test logic - all database types use the same test assertions Compatibility is maintained - other tests such as DruidIsolationTest run normally I hadn’t looked closely at the test code 😅, changing it to `NotSupportYetException` does seem effective! I think the current approach is fine as well, but how about wrapping only the methods that throw ParserException in a try-catch block? - Currently, the entire method is wrapped in a try-catch block, which I think hurts readability. -- 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: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org