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

Issue 6497109: UnitAgent now runs a Uniter

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

Description

UnitAgent now runs a Uniter https://code.launchpad.net/~fwereade/juju-core/jujud-run-uniter/+merge/123550 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 9

Patch Set 2 : UnitAgent now runs a Uniter #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -12 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/unit.go View 2 chunks +39 lines, -2 lines 0 comments Download
M cmd/jujud/unit_test.go View 1 2 chunks +66 lines, -1 line 0 comments Download
M juju/testing/conn.go View 2 chunks +1 line, -4 lines 0 comments Download
M state/charm_test.go View 3 chunks +12 lines, -5 lines 0 comments Download

Messages

Total messages: 5
fwereade
Please take a look.
11 years, 8 months ago (2012-09-10 13:39:21 UTC) #1
rog
On 2012/09/10 13:39:21, fwereade wrote: > Please take a look. LGTM
11 years, 8 months ago (2012-09-11 17:06:45 UTC) #2
rog
https://codereview.appspot.com/6497109/diff/1/juju/testing/conn.go File juju/testing/conn.go (right): https://codereview.appspot.com/6497109/diff/1/juju/testing/conn.go#newcode140 juju/testing/conn.go:140: sch, err := s.Conn.PutCharm(curl, testing.Charms.Path, false) aha! oops.
11 years, 8 months ago (2012-09-11 17:06:52 UTC) #3
niemeyer
LGTM! https://codereview.appspot.com/6497109/diff/1/cmd/jujud/unit_test.go File cmd/jujud/unit_test.go (right): https://codereview.appspot.com/6497109/diff/1/cmd/jujud/unit_test.go#newcode86 cmd/jujud/unit_test.go:86: timeout := time.After(2000 * time.Millisecond) I know it's ...
11 years, 8 months ago (2012-09-11 21:21:59 UTC) #4
fwereade
11 years, 8 months ago (2012-09-12 07:26:15 UTC) #5
*** Submitted:

UnitAgent now runs a Uniter

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

https://codereview.appspot.com/6497109/diff/1/cmd/jujud/unit_test.go
File cmd/jujud/unit_test.go (right):

https://codereview.appspot.com/6497109/diff/1/cmd/jujud/unit_test.go#newcode86
cmd/jujud/unit_test.go:86: timeout := time.After(2000 * time.Millisecond)
On 2012/09/11 21:21:59, niemeyer wrote:
> I know it's way less cool, but that's 2 * time.Second. :-)

Bumped to 3 in line with other CL

https://codereview.appspot.com/6497109/diff/1/cmd/jujud/unit_test.go#newcode91
cmd/jujud/unit_test.go:91: case <-time.After(200 * time.Millisecond):
On 2012/09/11 21:21:59, niemeyer wrote:
> s/200/50/
> 
> It's fine to spin slightly faster for responsiveness.

I have an unsupported feeling that the harder I work to check status quickly,
the more likely it is that I'll hit the global timeout because I'm starving the
uniter of resources. I'll go with this though :).

https://codereview.appspot.com/6497109/diff/1/cmd/jujud/unit_test.go#newcode99
cmd/jujud/unit_test.go:99: c.Logf("started!")
On 2012/09/11 21:21:59, niemeyer wrote:
> s/!/OMG!!!/

:D

https://codereview.appspot.com/6497109/diff/1/cmd/jujud/unit_test.go#newcode108
cmd/jujud/unit_test.go:108: c.Assert(<-done, IsNil)
On 2012/09/11 21:21:59, niemeyer wrote:
> This, the goroutine, and the channel, seem unnecessary.
> 
> c.Assert(a.Stop, IsNil)

Run blocks, so I can't see how to make it work (and check that Run actually does
stop) without this machinery. Submitting as-is; will gladly do a trivial
followup once you've explained what I missed :).
Sign in to reply to this message.

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