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 logpoller integration tests #11440

Closed
wants to merge 6 commits into from
Closed

Conversation

reductionista
Copy link
Contributor

Fixes a bug in the LogPoller integration tests which prevented them from waiting until the filters were registered.

This was causing the Replay test to fail. Even though it was always completing the replay before the filters were registered (getting back 0 logs), the backup poller was making it appear as if it had received some logs. It's possible the same may have been happening with the rest of the tests, masking potential issues with the main LogPoller.

Backup poller is disabled on this branch for testing purposes. DO NOT MERGE to develop until that commit is reverted--we'll need to find a better way of disabling it for testing purposes.

Copy link
Contributor

github-actions bot commented Dec 1, 2023

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

Tofel and others added 3 commits December 12, 2023 13:16
Whenever hasFilters was false, the Eventually function was returning
before ever asserting that it was true... then continuing on as if
everything had succeeded since there were no assertions that failed.
The only reason this was helping the test pass was because it typically
took longer for the end block to get finalized than it did for the
filters to get registered... as long as we wait for the filters to be
registered there's no need to wait for the end block.
@reductionista reductionista marked this pull request as ready for review December 12, 2023 22:02
@reductionista reductionista requested a review from a team as a code owner December 12, 2023 22:02
@@ -191,6 +191,7 @@ func ExecuteLogPollerReplay(t *testing.T, cfg *Config, consistencyTimeout string
}

l.Info().Msg("Starting replay log poller test")
l.Info().Msg("( hasFilters bug fixed )")
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could have sworn I'd removed that... gone now

@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate failed

Failed condition 80.0% 80.0% Duplicated Lines (%) on New Code (is greater than 3%)

See analysis details on SonarQube

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