Skip to content

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

Description

@balasanjay
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

Activity

  1. balasanjay commented on Apr 13, 2013

    @balasanjay
    ContributorAuthor

    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).
  2. davecheney commented on Apr 13, 2013

    @davecheney
    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.

  3. rsc commented on Jul 30, 2013

    @rsc
    Contributor

    Comment 3:

    Labels changed: added suggested, go1.2maybe.

    Status changed to Accepted.

  4. robpike commented on Aug 16, 2013

    @robpike
    Contributor

    Comment 4:

    Owner changed to @robpike.

    Status changed to Started.

  5. robpike commented on Aug 19, 2013

    @robpike
    Contributor

    Comment 5:

    This issue was closed by revision 6fb9cc1.

    Status changed to Fixed.

  6. added this to the Go1.2 milestone on Apr 14, 2015
  7. locked and limited conversation to collaborators on Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeSuggestedIssues that may be good for new contributors looking for work to do.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions