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

proxy: use require.Eventually #300

Closed
wants to merge 1 commit into from
Closed

proxy: use require.Eventually #300

wants to merge 1 commit into from

Conversation

xhebox
Copy link
Collaborator

@xhebox xhebox commented Jun 2, 2023

What problem does this PR solve?

Issue Number: close #192

Problem Summary: There are no other time.Sleep tests can benefit from require.Eventually.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change
  • Has tiproxyctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: xhe <xw897002528@gmail.com>
@xhebox xhebox requested a review from djshow832 June 2, 2023 06:59
Comment on lines +676 to +678
require.Eventually(t, func() bool {
return statusNotifyClose == ts.mp.closeStatus.Load()
}, time.Second, 100*time.Millisecond)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check #204

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Then can we just close the issue?

Copy link
Collaborator

@djshow832 djshow832 left a comment

Choose a reason for hiding this comment

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

I'm closing the issue if there's no other test.

@djshow832 djshow832 closed this Jun 2, 2023
@xhebox xhebox deleted the fix_1 branch June 2, 2023 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace some waiting tests with require.Eventually()
2 participants