Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTime精度问题导致测试断言对象相等不通过 #578

Closed
tshwangq opened this issue Jun 24, 2024 · 1 comment
Closed

DateTime精度问题导致测试断言对象相等不通过 #578

tshwangq opened this issue Jun 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@tshwangq
Copy link

碰到问题,请在 https://github.com/YunaiV/ruoyi-vue-pro/issues 搜索是否存在相似的 issue。

不按照模板提交的 issue,会被系统自动删除。

基本信息

  • ruoyi-vue-pro 版本:源代码Main 分支
  • 操作系统:Windows
  • 数据库:MySql 8.0.33

你猜测可能的原因

时间精度不一致

复现步骤

第一步, git clone 最新的代码

第二步,进入项目目录, 运行 mvn clean package -X

报错信息

[ERROR] Failures:
[ERROR] OAuth2ApproveServiceImplTest.testGetApproveList:212 Field(expiresTime) 不匹配 ==> expected: <2024-06-25T15:43:44.204956700> but was: <2024-06-25T15:43:44.204957>
[ERROR] OAuth2CodeServiceImplTest.testConsumeAuthorizationCode_success:95 Field(expiresTime) 不匹配 ==> expected: <2024-06-25T15:43:46.011518300> but was: <2024-06-25T15:43:46.011518>
[ERROR] OAuth2CodeServiceImplTest.testCreateAuthorizationCode:53 Field(expiresTime) 不匹配 ==> expected: <2024-06-24T15:48:46.035170800> but was: <2024-06-24T15:48:46.035171>
[ERROR] OAuth2TokenServiceImplTest.testCheckAccessToken_success:240 Field(expiresTime) 不匹配 ==> expected: <2024-06-25T15:43:47.675418900> but was: <2024-06-25T15:43:47.675419>
[ERROR] OAuth2TokenServiceImplTest.testCreateAccessToken:80 Field(expiresTime) 不匹配 ==> expected: <2024-06-24T15:44:17.979688600> but was: <2024-06-24T15:44:17.979689>
[ERROR] OAuth2TokenServiceImplTest.testGetAccessToken:201 Field(expiresTime) 不匹配 ==> expected: <2024-06-25T15:43:47.959763900> but was: <2024-06-25T15:43:47.959764>
[ERROR] OAuth2TokenServiceImplTest.testRefreshAccessToken_success:180 Field(expiresTime) 不匹配 ==> expected: <2024-06-24T15:44:17.879704500> but was: <2024-06-24T15:44:17.879705>
[ERROR] OAuth2TokenServiceImplTest.testRemoveAccessToken_success:262 Field(expiresTime) 不匹配 ==> expected: <2024-06-25T15:43:47.999152500> but was: <2024-06-25T15:43:47.999153>

@YunaiV
Copy link
Owner

YunaiV commented Jul 7, 2024

windows11 貌似会碰到这个问题,可以暂时忽略这个单测噢。

#491

@YunaiV YunaiV self-assigned this Jul 7, 2024
@YunaiV YunaiV added the bug Something isn't working label Jul 7, 2024
@YunaiV YunaiV closed this as completed Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants