@Test
    @Order(2)
    public void test() {
        for (DialectProperties dialectProperties : dialectPropertiesList) {
            String dbTypeEnum = dialectProperties.getDbType();

            // creat
            DataSourcePreConnectParam dataSourceCreateParam = new DataSourcePreConnectParam();

            dataSourceCreateParam.setType(dbTypeEnum);
            dataSourceCreateParam.setUrl(dialectProperties.getErrorUrl());
            dataSourceCreateParam.setUser(dialectProperties.getUsername());
            dataSourceCreateParam.setPassword(dialectProperties.getPassword());
            ActionResult dataSourceConnect = dataSourceService.preConnect(dataSourceCreateParam);
            log.info("Create database returns: {}", JSON.toJSONString(dataSourceConnect));
            Assertions.assertFalse(dataSourceConnect.getSuccess(), "Database creation failed error");
        }
    }
Data source testing

@author Jiaju Zhuang
chat2db-server/chat2db-server-test/src/test/java/ai/chat2db/server/test/domain/data/service/SQLExecutorOperationsTest.java