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

🌱 Refactor Lease controller test cases. #435

Conversation

xuezhaojun
Copy link
Member

@xuezhaojun xuezhaojun commented Apr 21, 2024

Summary

Nothing change in the real code, all changes is about u-t test cases.

We want to avoid using specific times like:

// wait one cycle (1 ~ 1.25s)
time.Sleep(2000 * time.Millisecond)

or:

// wait a few milliseconds to start the lease update routine
time.Sleep(500 * time.Millisecond)

When u-t is running on different environments, it may cause inaccurate results.

@openshift-ci openshift-ci bot requested review from ldpliu and skeeey April 21, 2024 14:45
@xuezhaojun
Copy link
Member Author

/assign @qiujian16
/assign @skeeey

@xuezhaojun xuezhaojun force-pushed the refactor-lease-controller branch from ccc7e52 to 17785f7 Compare April 21, 2024 14:48
Copy link

codecov bot commented Apr 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.41%. Comparing base (bcbe4d2) to head (170c7a9).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #435      +/-   ##
==========================================
+ Coverage   61.54%   62.41%   +0.86%     
==========================================
  Files         133      133              
  Lines       14078    11333    -2745     
==========================================
- Hits         8665     7073    -1592     
+ Misses       4664     3507    -1157     
- Partials      749      753       +4     
Flag Coverage Δ
unit 62.41% <ø> (+0.86%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: GitHub <noreply@github.com>
@xuezhaojun xuezhaojun force-pushed the refactor-lease-controller branch from 17785f7 to 170c7a9 Compare April 21, 2024 14:58
@skeeey
Copy link
Member

skeeey commented Apr 22, 2024

LGTM

Copy link
Member

@qiujian16 qiujian16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Apr 22, 2024
Copy link
Contributor

openshift-ci bot commented Apr 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, xuezhaojun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit eba3d96 into open-cluster-management-io:main Apr 22, 2024
14 checks passed
@xuezhaojun xuezhaojun deleted the refactor-lease-controller branch April 22, 2024 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants