Skip to content

fix(coderd/insights_internal_test.go): remove troublesome test case #9874

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

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Sep 26, 2023

Fixes #9873

This was failing at particular times of day:

Screenshot 2023-09-26 at 10 26 57

  • Added some logging for later
  • Removing this particular test case

@johnstcn johnstcn self-assigned this Sep 26, 2023
@johnstcn johnstcn requested review from mtojek and mafredri September 26, 2023 10:00
@johnstcn johnstcn changed the title fix(coderd): remove troublesome test case fix(coderd/insights_test.go): remove troublesome test case Sep 26, 2023
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Good idea with loggers!

@johnstcn johnstcn changed the title fix(coderd/insights_test.go): remove troublesome test case fix(coderd/insights_internal_test.go): remove troublesome test case Sep 26, 2023
@johnstcn johnstcn enabled auto-merge (squash) September 26, 2023 10:17
@johnstcn johnstcn disabled auto-merge September 26, 2023 10:18
@johnstcn johnstcn merged commit 96c5076 into main Sep 26, 2023
@johnstcn johnstcn deleted the cj/flake/Test_parseInsightsInterval_week branch September 26, 2023 10:33
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2023
@mafredri
Copy link
Member

mafredri commented Sep 26, 2023

I see there's about a two hour timeframe for when this would fail. If clock has passed 00:00, we can't subtract the two hours. So the test is faulty, we should set two hours ago to 00:00 when current time is between 00:00 and 01:59.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test flake: Test_parseInsightsInterval_week: Query param "end_time" must have the clock set to 00:00:00
3 participants