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

/events: Move WithClock to unit build tagged file #63

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JoshVanL
Copy link
Contributor

Reverts #62

WithClock should be moved to unit build tagged files to not pollute implementation non-test builds. Developers wanting to override the clock in testing can do so by go testing with the unit build tag.

@JoshVanL JoshVanL requested review from a team as code owners October 12, 2023 09:24
@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2023

Codecov Report

All modified lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@a043330). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #63   +/-   ##
=======================================
  Coverage        ?   81.05%           
=======================================
  Files           ?       40           
  Lines           ?     2328           
  Branches        ?        0           
=======================================
  Hits            ?     1887           
  Misses          ?      317           
  Partials        ?      124           
Files Coverage Δ
events/batcher/batcher.go 87.50% <ø> (ø)
events/batcher/unit.go 100.00% <100.00%> (ø)
events/queue/processor.go 90.21% <100.00%> (ø)
events/queue/processor_unit.go 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ItalyPaleAle ItalyPaleAle left a comment

Choose a reason for hiding this comment

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

#62 was made on purpose. Please don’t reverse this.

@JoshVanL
Copy link
Contributor Author

#62 was made on purpose. Please don’t reverse this.

I don't see the technical reason for needing WithClock in the implementation code. The mock code is still available in tests with the unit build tag.

@yaron2
Copy link
Member

yaron2 commented Nov 15, 2023

@JoshVanL please resolve the conflict

@JoshVanL
Copy link
Contributor Author

@yaron2 Done

@yaron2
Copy link
Member

yaron2 commented Nov 16, 2023

#62 was made on purpose. Please don’t reverse this.

I don't see the technical reason for needing WithClock in the implementation code. The mock code is still available in tests with the unit build tag.

@ItalyPaleAle please review this comment so we can decide how to move forward with this PR

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.

5 participants