@Operation(summary = "updateDataSource", description = "UPDATE_DATA_SOURCE_NOTES")
    @Parameters({
            @Parameter(name = "id", description = "DATA_SOURCE_ID", required = true, schema = @Schema(implementation = int.class)),
            @Parameter(name = "dataSourceParam", description = "DATA_SOURCE_PARAM", required = true, schema = @Schema(implementation = BaseDataSourceParamDTO.class))
    })
    @PutMapping(value = "/{id}")
    @ResponseStatus(HttpStatus.OK)
    @ApiException(UPDATE_DATASOURCE_ERROR)
    public Result<DataSource> updateDataSource(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
                                               @PathVariable(value = "id") Integer id,
                                               @RequestBody String jsonStr) {
        BaseDataSourceParamDTO dataSourceParam = DataSourceUtils.buildDatasourceParam(jsonStr);
        dataSourceParam.setId(id);
        DataSource dataSource = dataSourceService.updateDataSource(loginUser, dataSourceParam);
        return Result.success(dataSource);
    }
@Disabled("unknown yourself connection information")
    @Test
    public void testUpdateDataSource() throws Exception {
        HashMap<String, Object> paramsMap = new HashMap<>();
        paramsMap.put("id", 2);
        paramsMap.put("name", "mysql");
        paramsMap.put("node", "mysql data source test");
        paramsMap.put("type", "mysql");
        paramsMap.put("host", "192.168.xxxx.xx");
        paramsMap.put("port", 3306);
        paramsMap.put("principal", "");
        paramsMap.put("database", "dolphinscheduler");
        paramsMap.put("userName", "root");
        paramsMap.put("password", "root@123");
        paramsMap.put("other", new HashMap<>());
        paramsMap.put("testFlag", 0);
        paramsMap.put("bindTestId", 1);
        MvcResult mvcResult = mockMvc.perform(put("/datasources/2")
                .header("sessionId", sessionId)
                .content(JSONUtils.toJsonString(paramsMap)))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.APPLICATION_JSON))
                .andReturn();
        Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
        Assertions.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
        logger.info(mvcResult.getResponse().getContentAsString());
    }