Skip to content

fix: stop logging after test cleanup #19

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
May 27, 2025

Conversation

spikecurtis
Copy link
Collaborator

@spikecurtis spikecurtis commented May 27, 2025

Fixes Quartz so we don't accidentally log after the test ends, which can cause racy test failures

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@spikecurtis spikecurtis requested a review from mafredri May 27, 2025 11:20
@spikecurtis spikecurtis self-assigned this May 27, 2025
@spikecurtis spikecurtis marked this pull request as ready for review May 27, 2025 11:20
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

I can't recall of the top of my head, but should this apply to test failures as well? I.e. if the test is over we no longer call errors/fatal either.

Otherwise LGTM.

Copy link
Collaborator Author

I think we should still error if the "main" part of the test is complete, e.g. if some Mock error condition is triggered in a t.Cleanup, since this likely indicates a testing bug.

For example, in #13 we agreed that calling Close() on a Trap with an unreleased Call should fail the test. This behavior should be maintained even if the Trap is closed in a t.Cleanup rather than a defer as in most of our examples.

Copy link
Collaborator Author

spikecurtis commented May 27, 2025

Merge activity

  • May 27, 11:33 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 27, 11:33 AM UTC: @spikecurtis merged this pull request with Graphite.

@spikecurtis spikecurtis merged commit b71761c into main May 27, 2025
1 check passed
@spikecurtis spikecurtis deleted the spike/stop-logging-after-cleanup branch June 3, 2025 05:29
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