]> Cypherpunks repositories - gostls13.git/commit
testing: pause the test timer while waiting in T.Parallel
authorCaleb Spare <cespare@gmail.com>
Tue, 17 Nov 2015 03:34:54 +0000 (19:34 -0800)
committerRuss Cox <rsc@golang.org>
Tue, 24 Nov 2015 17:07:45 +0000 (17:07 +0000)
commita150c4ff2464b4d72732ea57c0831f58ff9b5e0f
treee9cbf8b15e849026bfef902c78fefddc9d9cfd94
parent5526d95019f893412a4039187fc9f8eeca8f18c6
testing: pause the test timer while waiting in T.Parallel

Before, we reset the timer at the end of T.Parallel, which is okay
assuming that T.Parallel is the first thing in the test.

Snapshot the elapsed time at the beginning of Parallel and include it in
the total duration so that any time spent in the test before calling
Parallel is reported in the test duration as well.

Updates #12243.

Change-Id: Ieca553e1f801e16b9b6416463fa8f7fa65425185
Reviewed-on: https://go-review.googlesource.com/16989
Reviewed-by: Russ Cox <rsc@golang.org>
src/testing/testing.go