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: Allow reusing the same operator to speed up tests #2068

Merged
merged 18 commits into from
Apr 23, 2023

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Apr 22, 2023

This PR refactor the behavior tests to allow using the same operator.

Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
@suyanhanx
Copy link
Member

I think the benefits are not significant, and it adds to the mental burden of maintainers. 👀

@Xuanwo
Copy link
Member Author

Xuanwo commented Apr 22, 2023

I think the benefits are not significant, and it adds to the mental burden of maintainers. 👀

  • tests are faster
  • tests are happened on the same operator (like real use cases)
  • more hidden errors are exposed (I fixed at least 5 bugs in this PR)
  • easier to add new test suite

I believe the benefits is good enough.

@suyanhanx
Copy link
Member

I think the benefits are not significant, and it adds to the mental burden of maintainers. 👀

  • tests are faster
  • tests are happened on the same operator (like real use cases)
  • more hidden errors are exposed (I fixed at least 5 bugs in this PR)
  • easier to add new test suite

I believe the benefits is good enough.

If it's just for the sake of speed, I don't think the benefits are significant.
Adding those you mentioned would be sufficient.

core/src/layers/retry.rs Outdated Show resolved Hide resolved
@Xuanwo Xuanwo requested a review from suyanhanx April 22, 2023 19:33
Copy link
Member

@suyanhanx suyanhanx left a comment

Choose a reason for hiding this comment

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

Great!

Are there any points need to pay attention to? Please update them in the behavior tests' readme.

@Xuanwo
Copy link
Member Author

Xuanwo commented Apr 23, 2023

Are there any points need to pay attention to? Please update them in the behavior tests' readme.

No.

Copy link
Member

@suyanhanx suyanhanx left a comment

Choose a reason for hiding this comment

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

Thanks.

@Xuanwo Xuanwo merged commit ca53000 into main Apr 23, 2023
@Xuanwo Xuanwo deleted the refactor-behavior-tests branch April 23, 2023 03:01
@Xuanwo Xuanwo mentioned this pull request Apr 23, 2023
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.

2 participants