LGTM for what it is, but might be nice to have as a checker.
https://codereview.appspot.com/10433043/diff/1/environs/azure/environ_test.go File environs/azure/environ_test.go (right):
https://codereview.appspot.com/10433043/diff/1/environs/azure/environ_test.go#newcode39 environs/azure/environ_test.go:39: func testLockingFunction(lock *sync.Mutex, function func()) { If this is to be a generic testing function, you should move it to the testing package and export it.
Here is a thought. Want to write this as a checker?
c.Assert(some_func, ObservesLockOn(some_mutex)) ?
https://codereview.appspot.com/10433043/diff/1/environs/azure/environ_test.go#newcode60 environs/azure/environ_test.go:60: // misbehaved "function" plenty of rope to hang itself. You could have a few sleep(0) type calls, as this should do the same thing.
https://codereview.appspot.com/10433043/diff/1/environs/azure/environ_test.go#newcode74 environs/azure/environ_test.go:74: blankLock := sync.Mutex{} Wow, surprised there is not a way to ask if a mutex is locked.
https://codereview.appspot.com/10433043/
« Back to merge proposal
LGTM for what it is, but might be nice to have as a checker.
https:/ /codereview. appspot. com/10433043/ diff/1/ environs/ azure/environ_ test.go azure/environ_ test.go (right):
File environs/
https:/ /codereview. appspot. com/10433043/ diff/1/ environs/ azure/environ_ test.go# newcode39 azure/environ_ test.go: 39: func testLockingFunc tion(lock
environs/
*sync.Mutex, function func()) {
If this is to be a generic testing function, you should move it to the
testing package and export it.
Here is a thought. Want to write this as a checker?
c.Assert(some_func, ObservesLockOn( some_mutex) ) ?
https:/ /codereview. appspot. com/10433043/ diff/1/ environs/ azure/environ_ test.go# newcode60 azure/environ_ test.go: 60: // misbehaved "function" plenty of
environs/
rope to hang itself.
You could have a few sleep(0) type calls, as this should do the same
thing.
https:/ /codereview. appspot. com/10433043/ diff/1/ environs/ azure/environ_ test.go# newcode74 azure/environ_ test.go: 74: blankLock := sync.Mutex{}
environs/
Wow, surprised there is not a way to ask if a mutex is locked.
https:/ /codereview. appspot. com/10433043/