Descriptiontesting/channel: Add helpers for testing channels
This adds some testing helpers to make it easier to do timeout-based
assertions on how a channel operates. I then use this in
worker/uniter/filter_test.go.
The easier fix for filter_test.go would be just to use the LongWait and
ShortWait constants. But I wanted to make it harder to use the wrong
timeouts.
I really like NotifyAsserterC (name is very flexible). However, I wish
it was easier to test a channel of arbitrary content. It looks like
reflect has some things we could use in go1.1 if we can get switched
over.
Mostly I want feedback before I go any deeper in this code.
https://code.launchpad.net/~jameinel/juju-core/transient-failure-filter/+merge/173680
(do not edit description out of merge proposal)
Patch Set 1 #
MessagesTotal messages: 3
|