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
Assignees
Milestone

Comments

@balasanjay
Copy link
Contributor

@balasanjay balasanjay commented Apr 13, 2013

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

This comment has been minimized.

Copy link
Contributor Author

@balasanjay balasanjay commented Apr 13, 2013

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

This comment has been minimized.

Copy link
Contributor

@davecheney davecheney commented Apr 13, 2013

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

This comment has been minimized.

Copy link
Contributor

@rsc rsc commented Jul 30, 2013

Comment 3:

Labels changed: added suggested, go1.2maybe.

Status changed to Accepted.

@robpike

This comment has been minimized.

Copy link
Contributor

@robpike robpike commented Aug 16, 2013

Comment 4:

Owner changed to @robpike.

Status changed to Started.

@robpike

This comment has been minimized.

Copy link
Contributor

@robpike robpike commented Aug 19, 2013

Comment 5:

This issue was closed by revision 6fb9cc1.

Status changed to Fixed.

@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
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.