Descriptiontesting: add testing.Race to allow authors to reduce the scope of their tests under the race runtime
Fixes issue 7706.
Discussion:
This CL adds a new function, testing.Race to the testing package. The author of issue 7706 original requested that something similar be added to the runtime/race package however I feel this approach is more convenient for the following reasons:
* The use case in issue 7706 spoke of reducing or skipping tests when run under the race enabled runtime. Adding the helper method to the testing package rather than the runtime/race package means authors don't need to import an additional package.
* The use of this function is similar to the existing testing.Short function, an example usage might be:
if testing.Short() || testing.Race() {
t.Skip("skipping expensive test")
}
Patch Set 1 #Patch Set 2 : diff -r 5c706d854210 https://code.google.com/p/go #Patch Set 3 : diff -r 5c706d854210 https://code.google.com/p/go #
Total comments: 1
Patch Set 4 : diff -r f0aac550f96e https://code.google.com/p/go #
MessagesTotal messages: 11
|