Skip to content

Commit

Permalink
fix(alibaba#12231): When inserting and updating configurations in the…
Browse files Browse the repository at this point in the history
… database, 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 361ac9f commit cf6287f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,11 @@ public void testUpdateConfigInfoAtomicCas() {

MapperResult mapperResult = configInfoMapperByMySql.updateConfigInfoAtomicCas(context);
Assert.assertEquals(mapperResult.getSql(), "UPDATE config_info SET "
+ "content=?, md5 = ?, src_ip=?,src_user=?,gmt_modified=?, app_name=?,c_desc=?,"
+ "content=?, md5 = ?, src_ip=?,src_user=?,gmt_modified=CURRENT_TIMESTAMP, app_name=?,c_desc=?,"
+ "c_use=?,effect=?,type=?,c_schema=?,encrypted_data_key=? "
+ "WHERE data_id=? AND group_id=? AND tenant_id=? AND (md5=? OR md5 IS NULL OR md5='')");
Assert.assertArrayEquals(mapperResult.getParamList().toArray(),
new Object[] {newContent, newMD5, srcIp, srcUser, time, appNameTmp, desc, use, effect, type, schema,
new Object[]{newContent, newMD5, srcIp, srcUser, appNameTmp, desc, use, effect, type, schema,
encryptedDataKey, dataId, group, tenantId, md5});
}
}

0 comments on commit cf6287f

Please sign in to comment.