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

Release lock before .WaitUntil #171

Merged
merged 4 commits into from
Dec 17, 2016
Merged

Conversation

anpez
Copy link
Contributor

@anpez anpez commented May 19, 2015

Release the lock before .WaitUntil prevents deadlocks when testing parallel objects.

Address #167: Unable to test concurrent objects

…ng parallel objects.

Address stretchr#167: Unable to test concurrent objects
@ernesto-jimenez
Copy link
Member

@anpez could you add a test so we avoid regressions in the future?

@DAddYE
Copy link
Contributor

DAddYE commented May 19, 2015

@anpez could you add a test so we avoid regressions in the future?

Agree

@ernesto-jimenez
Copy link
Member

@anpez small nudge, the tests from this PR are not passing :)

@anpez
Copy link
Contributor Author

anpez commented Nov 20, 2015

Fixed it! Looks like since I wrote it, some code around it changed :)

}()

// Allow the first call to execute, so the second one executes afterwards
ch2 <- time.Now()
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it would be good to have each go func() write something and assert the order is correct at the end of the test?

@ernesto-jimenez ernesto-jimenez merged commit 598ab58 into stretchr:master Dec 17, 2016
jonnyreeves pushed a commit to jonnyreeves/testify that referenced this pull request Jan 5, 2017
Release lock before .WaitUntil
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