1041
|
|
log: fix data race on log.Target
Many of our test cases set the value of log.Target, then reset it during the test/suite teardown. This has always been racy, but we've worked around it. We're now at the point that it can't be hidden anymore. In this case it is the mgo connection retry logic inside the state tests, but it will always be something.
This proposal makes the setting and getting of log.Target() (actually, log.target.logger) thread safe, and introduces a new nilLogger to make the logic inside each of the logging methods.
There is probably also a race on log.Debug, so a similar proposal will be needed as a followup.
Also, as witnessed by the duplication of logic that sets and resets the log.Target, try to push as much of the log target slight of hand into testing.LoggingSuite.
R=jameinel, dimitern, rog, fwereade, thumper CC= https://codereview.appspot.com/7524046
|
Dave Cheney |
11 years ago
|
|
|
1040
|
|
|
Benji York |
11 years ago
|
|
|
1039
|
|
|
Roger Peppe |
11 years ago
|
|
|
1038
|
|
|
Roger Peppe |
11 years ago
|
|
|
1037
|
|
|
Francesco Banconi |
11 years ago
|
|
|
1036
|
|
|
Roger Peppe |
11 years ago
|
|
|
1035
|
|
|
Gustavo Niemeyer |
11 years ago
|
|
|
1034
|
|
|
Gustavo Niemeyer |
11 years ago
|
|
|
1033
|
|
|
William Reade |
11 years ago
|
|
|
1032
|
|
|
Nicola Larosa |
11 years ago
|
|
|
1031
|
|
|
Nicola Larosa |
11 years ago
|
|
|
1030
|
|
|
Dimiter Naydenov |
11 years ago
|
|
|
1029
|
|
|
William Reade |
11 years ago
|
|
|
1028
|
|
|
William Reade |
11 years ago
|
|
|
1027
|
|
|
Roger Peppe |
11 years ago
|
|
|
1026
|
|
|
William Reade |
11 years ago
|
|
|
1025
|
|
|
Tim Penhey |
11 years ago
|
|
|
1024
|
|
|
John A Meinel |
11 years ago
|
|
|
1023
|
|
|
Brad Crittenden |
11 years ago
|
|
|
1022
|
|
Add category list to charms
Added category list to charms to support charmworld, which will display charm categories. While most charms will have only one, some will fit into multiple categories, such as Apache, which is both a web server and a proxy.
There will be an official list of categories, but supplying an unofficial category is a lint error, not a syntax error, so this branch does not address that. The order of the values is not significant, so in Python terms categories are a set, not a list, but since none of JSON, BSON and Go has direct support for sets, a list is used.
This branch also adds tests to ensure that Meta objects can be roundtripped via BSON.
R=dfc, fwereade, jameinel CC= https://codereview.appspot.com/7762043
|
Aaron Bentley |
11 years ago
|
|
|