Skip to content

Conversation

mafredri
Copy link
Member

Because require uses t.FailNow() and require.Eventually runs the
function in a goroutine, which is not allowed.

Shout out to @johnstcn for showing us the way!

@mafredri mafredri self-assigned this Jul 22, 2022
@mafredri mafredri requested review from johnstcn and a team July 22, 2022 10:43
@Emyrk
Copy link
Member

Emyrk commented Jul 22, 2022

cough cough linter rule cough

I joke, but this could be a linter rule

@mafredri
Copy link
Member Author

Good suggestion @Emyrk, I'll take a shot at writing one.

@mafredri
Copy link
Member Author

@Emyrk added, and it caught one more instance! 😄

Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

🚀

@mafredri mafredri enabled auto-merge (squash) July 22, 2022 16:21
@mafredri mafredri disabled auto-merge July 22, 2022 16:36
mafredri and others added 4 commits July 22, 2022 19:37
Because require uses `t.FailNow()` and `require.Eventually` runs the
function in a goroutine, which is not allowed.
Co-authored-by: Cian Johnston <cian@coder.com>
@mafredri mafredri force-pushed the mafredri/fix-use-of-require-in-require-eventually branch from 7b7124d to f6167b6 Compare July 22, 2022 16:38
@mafredri mafredri merged commit 51dd1fd into main Jul 22, 2022
@mafredri mafredri deleted the mafredri/fix-use-of-require-in-require-eventually branch July 22, 2022 17:02
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.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy