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

Fix: race condition in the v1 ingestor server tests #468

Merged
merged 2 commits into from
Oct 18, 2022

Conversation

ctlong
Copy link
Member

@ctlong ctlong commented Oct 17, 2022

Description

There was a recurring race condition because of a goroutine that was running the Pusher method on manager, and the BeforeEach which would assign a new v1 IngestorServer to manager.

This change stops the goroutine after it's not needed, and waits for it to close before completing the It test.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing performed?

  • Unit tests
  • Integration tests
  • Acceptance tests

Checklist:

  • This PR is being made against the main branch, or relevant version branch
  • I have made corresponding changes to the documentation
  • I have added testing for my changes

If you have any questions, or want to get attention for a PR or issue please reach out on the #logging-and-metrics channel in the cloudfoundry slack

There was a recurring race condition because of a goroutine that was
running the `Pusher` method on manager, and the BeforeEach which would
assign a new v1 `IngestorServer` to manager.

This change stops the goroutine after it's not needed, and waits for it
to close before completing the `It` test.
@ctlong ctlong requested a review from a team October 18, 2022 00:07
Now all tests will be run even if there is a failure.
@ctlong ctlong merged commit fd1293d into main Oct 18, 2022
@ctlong ctlong deleted the fix/race-condition-in-v1-ingestor-server branch October 18, 2022 18:08
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