Reviewers: mp+169155_code.launchpad.net, Message: Please take a look. Description: cmd/juju: Make a test deterministic TestGatherDescriptionsInParallel was timing dependent, and occasionally failed on my system. Rather than just increasing the timeout arbitrarily, I changed the code to be more 'event' based. Each plugin requires another plugin to have started before that plugin will return. Thus, if we don't start the plugins in parallel, the plugin will deadlock. Because the failure mode is 'deadlock', I wrapped the call in a select timeout. This means that if it *does* fail, we have a garbage goroutine and process lying around (but it should never fail). On the plus side, this makes it actually run faster, since each subprocess doesn't waste time sleeping just so we can measure it. (from 350ms down to normally around 15ms.) This is the only test that was failing (based on occasional timing hiccups) for me, which allows us to have this in tarmac. https://code.launchpad.net/~jameinel/juju-core/timing-test/+merge/169155 (do not edit description out of merge proposal) Please review this at https://codereview.appspot.com/10234047/ Affected files: A [revision details] M cmd/juju/plugin_test.go Index: [revision details] === added file '[revision details]' --- [revision details] 2012-01-01 00:00:00 +0000 +++ [revision details] 2012-01-01 00:00:00 +0000 @@ -0,0 +1,2 @@ +Old revision: