You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/10/20 06:29:32 UTC

[GitHub] [dolphinscheduler] caishunfeng commented on a change in pull request #6500: [Improvement-5807][Dao] Use h2 in UT Use H2 in UT

caishunfeng commented on a change in pull request #6500:
URL: https://github.com/apache/dolphinscheduler/pull/6500#discussion_r732451405



##########
File path: dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/datasource/SpringConnectionFactory.java
##########
@@ -106,17 +115,30 @@ public DruidDataSource dataSource() throws SQLException {
         //auto commit
         druidDataSource.setDefaultAutoCommit(PropertyUtils.getBoolean(Constants.SPRING_DATASOURCE_DEFAULT_AUTO_COMMIT, true));
         druidDataSource.init();
+        logger.info("Initialize Druid DataSource success");
         return druidDataSource;
     }
 
+    @Bean(name = "datasource")
+    @Profile(value = {ProfileType.UNIT_TEST})
+    public DataSource h2DataSource() {

Review comment:
       Should the unit test run with other datasource? I found the same sql exception in pgsql;




-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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