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 max series test loop that returns early #6345

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

chroberts
Copy link
Contributor

What this PR does / why we need it:

This PR fixes a test. Before the PR, the TestEngine_MaxSeries test returns after the first test and prevents the other tests from running.

Which issue(s) this PR fixes:
Fixes #: N/A

Special notes for your reviewer:
Adding t.Run allows using the return, but I went ahead and also removed the return and added an else to make it more clear. This would have prevented this and may protect against future moves/refactors.

Checklist

  • Documentation added
  • Tests updated
  • Is this an important fix or new feature? Add an entry in the CHANGELOG.md.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

Signed-off-by: Christopher Norris <christopher.norris@grafana.com>
@chroberts chroberts added the go Pull requests that update Go code label Jun 8, 2022
@chroberts chroberts requested a review from a team as a code owner June 8, 2022 21:25
@chroberts chroberts self-assigned this Jun 8, 2022
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0.3%
+            querier	0%
- querier/queryrange	-0.1%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0.1%
+               loki	0%

@CLAassistant
Copy link

CLAassistant commented Jun 8, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@DylanGuedes DylanGuedes left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM

@cyriltovena cyriltovena merged commit 874aa64 into main Jun 9, 2022
@cyriltovena cyriltovena deleted the cn/fix-series-test-loop branch June 9, 2022 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants