From 45a4108138c377de19fd39aeff5b5b7748f5ab83 Mon Sep 17 00:00:00 2001 From: "LAPTOP-00JMG2HE\\George Wei" Date: Sat, 24 Aug 2024 22:05:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BF=BD=E7=95=A5expiresTime?= =?UTF-8?q?=E3=80=81createTime=E5=92=8CupdateTime=E7=9A=84TODO=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/infra/service/job/JobLogServiceImplTest.java | 1 + .../service/logger/ApiAccessLogServiceImplTest.java | 1 + .../infra/service/logger/ApiErrorLogServiceImplTest.java | 1 + .../service/oauth2/OAuth2ApproveServiceImplTest.java | 1 + .../system/service/oauth2/OAuth2CodeServiceImplTest.java | 2 ++ .../service/oauth2/OAuth2TokenServiceImplTest.java | 9 +++++++++ 6 files changed, 15 insertions(+) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/job/JobLogServiceImplTest.java b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/job/JobLogServiceImplTest.java index 0ef0f6692..a6bd3c8c8 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/job/JobLogServiceImplTest.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/job/JobLogServiceImplTest.java @@ -114,6 +114,7 @@ public class JobLogServiceImplTest extends BaseDbUnitTest { assertEquals(1, count); List logs = jobLogMapper.selectList(); assertEquals(1, logs.size()); + // TODO @芋艿:createTime updateTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(log02, logs.get(0), "createTime", "updateTime"); } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImplTest.java b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImplTest.java index 7ad09e19b..a1e1f64a6 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImplTest.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImplTest.java @@ -91,6 +91,7 @@ public class ApiAccessLogServiceImplTest extends BaseDbUnitTest { assertEquals(1, count); List logs = apiAccessLogMapper.selectList(); assertEquals(1, logs.size()); + // TODO @芋艿:createTime updateTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(log02, logs.get(0), "createTime", "updateTime"); } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImplTest.java b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImplTest.java index 0a3c20994..3ae291935 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImplTest.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImplTest.java @@ -157,6 +157,7 @@ public class ApiErrorLogServiceImplTest extends BaseDbUnitTest { assertEquals(1, count); List logs = apiErrorLogMapper.selectList(); assertEquals(1, logs.size()); + // TODO @芋艿:createTime updateTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(log02, logs.get(0), "createTime", "updateTime"); } diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2ApproveServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2ApproveServiceImplTest.java index 05432275c..142201c29 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2ApproveServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2ApproveServiceImplTest.java @@ -209,6 +209,7 @@ public class OAuth2ApproveServiceImplTest extends BaseDbUnitTest { List result = oauth2ApproveService.getApproveList(userId, userType, clientId); // 断言 assertEquals(1, result.size()); + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(approve, result.get(0), "expiresTime"); } diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2CodeServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2CodeServiceImplTest.java index c052576f1..cba9d3e5d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2CodeServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2CodeServiceImplTest.java @@ -50,6 +50,7 @@ class OAuth2CodeServiceImplTest extends BaseDbUnitTest { scopes, redirectUri, state); // 断言 OAuth2CodeDO dbCodeDO = oauth2CodeMapper.selectByCode(codeDO.getCode()); + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(codeDO, dbCodeDO, "expiresTime", "createTime", "updateTime", "deleted"); assertEquals(userId, codeDO.getUserId()); assertEquals(userType, codeDO.getUserType()); @@ -92,6 +93,7 @@ class OAuth2CodeServiceImplTest extends BaseDbUnitTest { // 调用 OAuth2CodeDO result = oauth2CodeService.consumeAuthorizationCode(code); + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(codeDO, result, "expiresTime"); assertNull(oauth2CodeMapper.selectByCode(code)); } diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2TokenServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2TokenServiceImplTest.java index a3070648f..c548940d6 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2TokenServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/oauth2/OAuth2TokenServiceImplTest.java @@ -77,6 +77,7 @@ public class OAuth2TokenServiceImplTest extends BaseDbAndRedisUnitTest { OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.createAccessToken(userId, userType, clientId, scopes); // 断言访问令牌 OAuth2AccessTokenDO dbAccessTokenDO = oauth2AccessTokenMapper.selectByAccessToken(accessTokenDO.getAccessToken()); + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(accessTokenDO, dbAccessTokenDO, "expiresTime", "createTime", "updateTime", "deleted"); assertEquals(userId, accessTokenDO.getUserId()); assertEquals(userType, accessTokenDO.getUserType()); @@ -88,6 +89,7 @@ public class OAuth2TokenServiceImplTest extends BaseDbAndRedisUnitTest { assertFalse(DateUtils.isExpired(accessTokenDO.getExpiresTime())); // 断言访问令牌的缓存 OAuth2AccessTokenDO redisAccessTokenDO = oauth2AccessTokenRedisDAO.get(accessTokenDO.getAccessToken()); + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(accessTokenDO, redisAccessTokenDO, "expiresTime", "createTime", "updateTime", "deleted"); // 断言刷新令牌 OAuth2RefreshTokenDO refreshTokenDO = oauth2RefreshTokenMapper.selectList().get(0); @@ -177,12 +179,14 @@ public class OAuth2TokenServiceImplTest extends BaseDbAndRedisUnitTest { assertNull(oauth2AccessTokenRedisDAO.get(accessTokenDO.getAccessToken())); // 断言,新的访问令牌 OAuth2AccessTokenDO dbAccessTokenDO = oauth2AccessTokenMapper.selectByAccessToken(newAccessTokenDO.getAccessToken()); + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(newAccessTokenDO, dbAccessTokenDO, "expiresTime", "createTime", "updateTime", "deleted"); assertPojoEquals(newAccessTokenDO, refreshTokenDO, "id", "expiresTime", "createTime", "updateTime", "deleted", "creator", "updater"); assertFalse(DateUtils.isExpired(newAccessTokenDO.getExpiresTime())); // 断言,新的访问令牌的缓存 OAuth2AccessTokenDO redisAccessTokenDO = oauth2AccessTokenRedisDAO.get(newAccessTokenDO.getAccessToken()); + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(newAccessTokenDO, redisAccessTokenDO, "expiresTime", "createTime", "updateTime", "deleted"); } @@ -198,8 +202,10 @@ public class OAuth2TokenServiceImplTest extends BaseDbAndRedisUnitTest { // 调用 OAuth2AccessTokenDO result = oauth2TokenService.getAccessToken(accessToken); // 断言 + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(accessTokenDO, result, "expiresTime", "createTime", "updateTime", "deleted", "creator", "updater"); + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(accessTokenDO, oauth2AccessTokenRedisDAO.get(accessToken), "expiresTime", "createTime", "updateTime", "deleted", "creator", "updater"); } @@ -237,6 +243,7 @@ public class OAuth2TokenServiceImplTest extends BaseDbAndRedisUnitTest { // 调研,并断言 OAuth2AccessTokenDO result = oauth2TokenService.getAccessToken(accessToken); // 断言 + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(accessTokenDO, result, "expiresTime", "createTime", "updateTime", "deleted", "creator", "updater"); } @@ -259,6 +266,7 @@ public class OAuth2TokenServiceImplTest extends BaseDbAndRedisUnitTest { oauth2RefreshTokenMapper.insert(refreshTokenDO); // 调用 OAuth2AccessTokenDO result = oauth2TokenService.removeAccessToken(accessTokenDO.getAccessToken()); + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(accessTokenDO, result, "expiresTime", "createTime", "updateTime", "deleted", "creator", "updater"); // 断言数据 @@ -297,6 +305,7 @@ public class OAuth2TokenServiceImplTest extends BaseDbAndRedisUnitTest { // 断言 assertEquals(1, pageResult.getTotal()); assertEquals(1, pageResult.getList().size()); + // TODO @芋艿:expiresTime 被屏蔽,仅 win11 会复现,建议后续修复。 assertPojoEquals(dbAccessToken, pageResult.getList().get(0), "expiresTime"); }