-
Notifications
You must be signed in to change notification settings - Fork 728
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
*: fix TestWatcher
#8812
*: fix TestWatcher
#8812
Conversation
63b5f2b
to
88de955
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8812 +/- ##
==========================================
+ Coverage 75.21% 75.25% +0.04%
==========================================
Files 459 456 -3
Lines 71843 71608 -235
==========================================
- Hits 54035 53887 -148
+ Misses 14351 14295 -56
+ Partials 3457 3426 -31
Flags with carried forward coverage won't be shown. Click here to find out more. |
/hold |
Signed-off-by: Ryan Leung <[email protected]>
88de955
to
967a861
Compare
/hold cancel |
@@ -357,6 +356,8 @@ func TestWatcher(t *testing.T) { | |||
}, | |||
}, | |||
} | |||
// wait watch to start | |||
time.Sleep(time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we replace it with something like testutil.Eventually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seem we cannot get the watcher state outside
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use this way to control the messaging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for this case, sleep is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lhy1024, okJiang 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 |
What problem does this PR solve?
Issue Number: Close #8549.
What is changed and how does it work?
Wait until the watcher finishes starting, then write the key.
Check List
Tests
Release note