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 tests for GRPC check #88

Merged
merged 2 commits into from
Feb 21, 2023
Merged

Refactor tests for GRPC check #88

merged 2 commits into from
Feb 21, 2023

Conversation

alexandear
Copy link
Contributor

@alexandear alexandear commented Feb 21, 2023

This PR refactors checks/grpc/check_test.go:

  • Fix "defer is not called in TestMain because of os.Exit".
  • Run tests in parallel to speed up.
  • Use a table-driven approach to reduce repetitive code.
  • Listen to only localhost instead of all interfaces.
  • Choose a randomly listen port for each test case.

- Fix "defer is not called in TestMain because of os.Exit".
- Use table-driven approach to reduce repetitive code.
- Listen only localhost instead of all interfaces.
- Choose random listen port.
Copy link
Contributor

@lucasmdrs lucasmdrs left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution @alexandear

@alexandear alexandear requested a review from lucasmdrs February 21, 2023 11:31
@lucasmdrs lucasmdrs merged commit ef872fc into hellofresh:master Feb 21, 2023
@alexandear alexandear deleted the refactor-grpc-check-test branch February 21, 2023 11:41
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