Skip to content

Commit

Permalink
fix(#12231): When inserting and updating configurations in the databa…
Browse files Browse the repository at this point in the history
…se, the time-related field values need to be set using the time obtained from the database's built-in time function.
  • Loading branch information
Bo-Qiu committed Jun 15, 2024
1 parent 0f5bb71 commit 0fd35f4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ void testInsertOrUpdateTagCasOfException() {
Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[]{dataId, group, tenant, tag}),
eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null);
Mockito.when(jdbcTemplate.update(anyString(), eq(dataId), eq(group), eq(tenant), eq(tag), eq(appName), eq(configInfo.getContent()),
eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser))).thenThrow(new CannotGetJdbcConnectionException("throw exception add config tag"));
eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser)))
.thenThrow(new CannotGetJdbcConnectionException("throw exception add config tag"));
try {
externalConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, tag, srcIp, srcUser);
assertTrue(false);
Expand Down

0 comments on commit 0fd35f4

Please sign in to comment.