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

Ignore t.Parallel goroutines, they represent queued tests #25

Merged
merged 2 commits into from
Jun 11, 2018

Conversation

prashantv
Copy link
Collaborator

When t.Parallel is used, tests are queued to run after all serially
executed tests are run. This causes issues if the serial test tries to
verify goroutines.

Fixes #16

When t.Parallel is used, tests are queued to run after all serially
executed tests are run. This causes issues if the serial test tries to
verify goroutines.
@prashantv prashantv requested a review from chucknthem June 4, 2018 22:49
@CLAassistant
Copy link

CLAassistant commented Jun 4, 2018

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Jun 4, 2018

Codecov Report

Merging #25 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #25   +/-   ##
=======================================
  Coverage   95.03%   95.03%           
=======================================
  Files           4        4           
  Lines         141      141           
=======================================
  Hits          134      134           
  Misses          4        4           
  Partials        3        3
Impacted Files Coverage Δ
options.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d13b03e...85db571. Read the comment docs.

@zchee zchee mentioned this pull request Jun 5, 2018
Copy link

@chucknthem chucknthem left a comment

Choose a reason for hiding this comment

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

lgtm

options.go Outdated
@@ -115,7 +115,7 @@ func isTestStack(s stack.Stack) bool {
// to end by waiting on a channel.
// Since go1.7, a separate goroutine is started to wait for signals.
switch s.FirstFunction() {
case "testing.RunTests", "testing.(*T).Run":
case "testing.RunTests", "testing.(*T).Run", "testing.(*T).Parallel":
// In pre1.7 and post-1.7, background goroutines started by the testing

Choose a reason for hiding this comment

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

edit the comment to include t.Parallel

@prashantv prashantv merged commit b12bb1e into master Jun 11, 2018
@prashantv prashantv deleted the ignore_parallel branch June 11, 2018 19:07
@jhuliano jhuliano mentioned this pull request May 21, 2019
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.

None yet

3 participants