dolphinscheduler
dolphinscheduler copied to clipboard
[Improvement][API] Extract the function `getConnection` from the `DataSourceService.java` as a public function
Describe the question
Extract the function getConnection(DbType dbType, String parameter)from theDataSourceService.java` as a public function
What are the current deficiencies and the benefits of improvement
- The getConnection function, which can be used to read/write data in addition to testing the database connection, currently exists as a private function in the 'datasourceservice.java' class:
- The function itself has nothing to do with the DataSource; its relationship to the function within the DataSourceService should be called/invoked rather than included.
- Bad for function reuse.
- When writing a test case for a DataSourceService, it is not easy to use the
mockagent to mock its execution results because it is a private function
Which version of DolphinScheduler: -[dev]