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

Issue 6568046: uniter: use entity watchers

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by fwereade
Modified:
11 years, 7 months ago
Reviewers:
mp+126210
Visibility:
Public.

Description

uniter: use entity watchers The watcher stubs are now unused, and have been completely removed. Uniter tests now pass. https://code.launchpad.net/~fwereade/juju-core/working-uniter-tests/+merge/126210 Requires: https://code.launchpad.net/~fwereade/juju-core/relation-units-without-presence/+merge/126111 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : uniter: use entity watchers #

Total comments: 15

Patch Set 3 : uniter: use entity watchers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -128 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M state/watcher.go View 1 2 3 chunks +2 lines, -54 lines 0 comments Download
M worker/uniter/modes.go View 6 chunks +47 lines, -35 lines 0 comments Download
M worker/uniter/uniter_test.go View 1 2 7 chunks +42 lines, -39 lines 0 comments Download

Messages

Total messages: 5
fwereade
Please take a look.
11 years, 7 months ago (2012-09-25 10:48:45 UTC) #1
rog
LGTM with one possible thought below. https://codereview.appspot.com/6568046/diff/2001/worker/uniter/modes.go File worker/uniter/modes.go (right): https://codereview.appspot.com/6568046/diff/2001/worker/uniter/modes.go#newcode305 worker/uniter/modes.go:305: ch, force, err ...
11 years, 7 months ago (2012-09-25 13:41:26 UTC) #2
niemeyer
Nice and sweet. https://codereview.appspot.com/6568046/diff/2001/worker/uniter/modes.go File worker/uniter/modes.go (right): https://codereview.appspot.com/6568046/diff/2001/worker/uniter/modes.go#newcode305 worker/uniter/modes.go:305: ch, force, err := service.Charm() On ...
11 years, 7 months ago (2012-09-25 14:51:39 UTC) #3
niemeyer
LGTM with those, btw.
11 years, 7 months ago (2012-09-25 14:52:00 UTC) #4
fwereade
11 years, 7 months ago (2012-09-25 23:19:06 UTC) #5
*** Submitted:

uniter: use entity watchers

The watcher stubs are now unused, and have been completely removed. Uniter
tests now pass.

R=rog, niemeyer
CC=
https://codereview.appspot.com/6568046

https://codereview.appspot.com/6568046/diff/2001/worker/uniter/uniter_test.go
File worker/uniter/uniter_test.go (right):

https://codereview.appspot.com/6568046/diff/2001/worker/uniter/uniter_test.go...
worker/uniter/uniter_test.go:575: func() {
On 2012/09/25 14:51:39, niemeyer wrote:
> This seems misplaced.

Yeah.

https://codereview.appspot.com/6568046/diff/2001/worker/uniter/uniter_test.go...
worker/uniter/uniter_test.go:584: defer func() {
On 2012/09/25 14:51:39, niemeyer wrote:
> This can go into step itself.

Actually, I think it's a matter of ctx.run(c, t.steps)

https://codereview.appspot.com/6568046/diff/2001/worker/uniter/uniter_test.go...
worker/uniter/uniter_test.go:599: c.Logf("%#v", s)
On 2012/09/25 14:51:39, niemeyer wrote:
> defer func() {
>     if ctx.uniter != nil {
>         c.Assert(ctx.uniter.Stop(), IsNil)
>     }
> }()

Not here actually, I think.

https://codereview.appspot.com/6568046/diff/2001/worker/uniter/uniter_test.go...
worker/uniter/uniter_test.go:729: case <-time.After(1 * time.Second):
On 2012/09/25 14:51:39, niemeyer wrote:
> s/1/5/

Done.

https://codereview.appspot.com/6568046/diff/2001/worker/uniter/uniter_test.go...
worker/uniter/uniter_test.go:815: timeout := time.After(10 * time.Second)
On 2012/09/25 14:51:39, niemeyer wrote:
> s/10/5/

Done.

https://codereview.appspot.com/6568046/diff/2001/worker/uniter/uniter_test.go...
worker/uniter/uniter_test.go:819: ctx.st.StartSync() // to detect presence
change
On 2012/09/25 14:51:39, niemeyer wrote:
> The comment is a bit vague. The code below isn't handling presence directly.
> 
> Can we please talk live about this?

Agreed live: Sync just before status check.
Sign in to reply to this message.

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