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

testing: t.Parallel should pause test timer while it waits #5285

Closed
balasanjay opened this issue Apr 13, 2013 · 5 comments
Closed

testing: t.Parallel should pause test timer while it waits #5285

balasanjay opened this issue Apr 13, 2013 · 5 comments
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@balasanjay
Copy link
Contributor

The function t.Parallel() does not pause the internal timer, so the time that it takes
for the test case to get scheduled gets counted in that test's execution time. 

Options:
1) This can be fixed by moving the StopTimer stuff from testing.B to testing.common, and
using those functions inside t.Parallel to stop the timer before doing the chan ops, and
starting the timer again afterwards.

2) Manually pause and resume the timer by messing around with the start time in
t.Parallel
@balasanjay
Copy link
Contributor Author

Comment 1:

I can write the fix, but I suspect it is too close to 1.1 to be accepted anyways. 
Either way, let me know which option is preferred so that when 1.1 is out, I can write
and send in a CR (if someone doesn't beat me to it).

@davecheney
Copy link
Contributor

Comment 2:

I suggest this is a post 1.1 issue. IMO t.Parallel is not commonly used.

Labels changed: added priority-later, removed priority-triage.

Status changed to HelpWanted.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 3:

Labels changed: added suggested, go1.2maybe.

Status changed to Accepted.

@robpike
Copy link
Contributor

robpike commented Aug 16, 2013

Comment 4:

Owner changed to @robpike.

Status changed to Started.

@robpike
Copy link
Contributor

robpike commented Aug 19, 2013

Comment 5:

This issue was closed by revision 6fb9cc1.

Status changed to Fixed.

@balasanjay balasanjay added fixed Suggested Issues that may be good for new contributors looking for work to do. labels Aug 19, 2013
@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc unassigned robpike Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

5 participants