Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(16428)

Issue 11035043: testing/channel: Add helpers for testing channels

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by jameinel
Modified:
10 years, 9 months ago
Reviewers:
mue, mp+173680, fwereade
Visibility:
Public.

Description

testing/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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -103 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M state/testing/watcher.go View 5 chunks +5 lines, -9 lines 0 comments Download
A testing/channel.go View 1 chunk +127 lines, -0 lines 0 comments Download
A testing/constants.go View 1 chunk +20 lines, -0 lines 0 comments Download
M worker/notifyworker_test.go View 5 chunks +8 lines, -20 lines 0 comments Download
M worker/uniter/filter_test.go View 15 chunks +67 lines, -74 lines 0 comments Download

Messages

Total messages: 3
jameinel
Please take a look.
10 years, 9 months ago (2013-07-09 09:43:52 UTC) #1
fwereade
LGTM. Would be nice to see these folded into the WatcherCs.
10 years, 9 months ago (2013-07-09 10:47:03 UTC) #2
mue
10 years, 9 months ago (2013-07-09 10:57:20 UTC) #3
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b