kyoty opened a new pull request #5633: URL: https://github.com/apache/dolphinscheduler/pull/5633
<!--Thanks very much for contributing to Apache DolphinScheduler. Please review https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html before opening a pull request.--> ## Purpose of the pull request in pr #5611 in table `t_ds_process_definition` we add a new unique key with `code`. in `ProcessDefinitionMapperTest.java` , both `insertTwo` and `insertOne` methods use a same code would caue a duplicatete key error: ```java Error: Tests run: 15, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.082 s <<< FAILURE! - in org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapperTest Error: testQueryDefinitionListByIdList(org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapperTest) Time elapsed: 0.007 s <<< ERROR! org.springframework.dao.DuplicateKeyException: ### Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "code_unique" Detail: Key (code)=(1) already exists. ### The error may exist in org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.java (best guess) ### The error may involve org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper.insert-Inline ### The error occurred while setting parameters ### SQL: INSERT INTO t_ds_process_definition ( code, timeout, project_code, update_time, user_id, version, create_time, tenant_id, name ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ? ) ### Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "code_unique" Detail: Key (code)=(1) already exists. ; ERROR: duplicate key value violates unique constraint "code_unique" Detail: Key (code)=(1) already exists.; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "code_unique" Detail: Key (code)=(1) already exists. at org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapperTest.insertTwo(ProcessDefinitionMapperTest.java:99) at org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapperTest.testQueryDefinitionListByIdList(ProcessDefinitionMapperTest.java:312) Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique co ``` ## Brief change log update the existed UT ## Verify this pull request Existed UTS -- 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: [email protected]
