You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/12/01 11:12:26 UTC

[GitHub] [shardingsphere] terrymanu commented on issue #8238: Add test cases for SQL parser cache

terrymanu commented on issue #8238:
URL: https://github.com/apache/shardingsphere/issues/8238#issuecomment-736436860


   > @terrymanu I encountered difficulties when coding `ParseTreeCacheLoaderTest`.
   > 
   > `SQLParserFactory.newInstance` is calling `SQLParserFacade` to create a singleton, and this facade is implemented in module `shardingsphere-sql-parser-dialect`, which is dependce on `shardingsphere-sql-parser-engine`.
   > 
   > When initializing `SQLParserExecutor`, it will cacuse `UnsupportedOperationException: Cannot support database type`
   > 
   > I have no idea how to assert, and can you support any suggestion?
   > 
   > Thanks.
   
   Please mock sqlParserExecutor after new ParseTreeCacheLoader, and use reflection to set your mock.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org