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

Issue 67080043: Simpleworker implemention

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by natefinch
Modified:
11 years, 8 months ago
Reviewers:
mp+207725, rog
Visibility:
Public.

Description

Simpleworker implemention https://code.launchpad.net/~natefinch/juju-core/036-simpleworker/+merge/207725 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -0 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
A worker/simpleworker.go View 1 chunk +46 lines, -0 lines 2 comments Download
A worker/simpleworker_test.go View 1 chunk +40 lines, -0 lines 2 comments Download

Messages

Total messages: 5
natefinch
Please take a look.
11 years, 8 months ago (2014-02-21 19:11:37 UTC) #1
natefinch
On 2014/02/21 19:11:37, nate.finch wrote: > Please take a look. Forgot to mention in the ...
11 years, 8 months ago (2014-02-21 19:12:43 UTC) #2
natefinch
On 2014/02/21 19:12:43, nate.finch wrote: > On 2014/02/21 19:11:37, nate.finch wrote: > > Please take ...
11 years, 8 months ago (2014-02-21 19:15:44 UTC) #3
rog
LGTM with a couple of suggestions below, thanks. https://codereview.appspot.com/67080043/diff/1/worker/simpleworker.go File worker/simpleworker.go (right): https://codereview.appspot.com/67080043/diff/1/worker/simpleworker.go#newcode7 worker/simpleworker.go:7: // ...
11 years, 8 months ago (2014-02-24 17:57:35 UTC) #4
natefinch
11 years, 8 months ago (2014-02-24 19:26:43 UTC) #5
https://codereview.appspot.com/67080043/diff/1/worker/simpleworker.go File worker/simpleworker.go (right): https://codereview.appspot.com/67080043/diff/1/worker/simpleworker.go#newcode7 worker/simpleworker.go:7: // mechanisms through the use of a couple channels. The channels are only used On 2014/02/24 17:57:36, rog wrote: > A slightly different suggestion: > > // simpleWorker implements the worker returned by NewSimpleWorker. > // The stopc and done channels are used for closing notifications > // only. No values are sent over them. The err value is set once only, > // just before the done channel is closed. > > ? Sounds good. Done. https://codereview.appspot.com/67080043/diff/1/worker/simpleworker_test.go File worker/simpleworker_test.go (right): https://codereview.appspot.com/67080043/diff/1/worker/simpleworker_test.go#ne... worker/simpleworker_test.go:39: c.Assert(w.Wait(), gc.Equals, nil) On 2014/02/24 17:57:36, rog wrote: > This isn't quite testing that we're waiting until doWork > returns (perhaps we're not actually seeing the value > returned by doWork at all). If we returned testError from the function, > the test would be more convincing. Good point. Done. > Then perhaps one more test to check that the > happy path works. Added a test that nil gets passed through Wait().
Sign in to reply to this message.

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