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

Issue 6499056: cmd/jujud: fix race in test

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

Description

cmd/jujud: fix race in test We should not call OpenPort until the new instance id has hit the state. We also fix a bug in firewaller where it called InstanceId even when it needed to do nothing, and take the opportunity to make the firewaller tests a little more concise now that we have JujuConnSuite. https://code.launchpad.net/~rogpeppe/juju-core/043-jujud-fix-test/+merge/122082 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/jujud: fix race in test #

Patch Set 3 : cmd/jujud: fix race in test #

Total comments: 2

Patch Set 4 : cmd/jujud: fix race in test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -77 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/provisioning_test.go View 1 chunk +14 lines, -1 line 0 comments Download
M worker/firewaller/firewaller.go View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M worker/firewaller/firewaller_test.go View 1 2 3 6 chunks +70 lines, -76 lines 0 comments Download

Messages

Total messages: 5
rog
Please take a look.
11 years, 8 months ago (2012-08-30 15:53:33 UTC) #1
TheMue
LGTM, only one small change with the config. https://codereview.appspot.com/6499056/diff/5001/worker/firewaller/firewaller_test.go File worker/firewaller/firewaller_test.go (right): https://codereview.appspot.com/6499056/diff/5001/worker/firewaller/firewaller_test.go#newcode84 worker/firewaller/firewaller_test.go:84: env, ...
11 years, 8 months ago (2012-08-30 16:00:44 UTC) #2
dave_cheney.net
LGTM.
11 years, 8 months ago (2012-08-31 02:25:20 UTC) #3
rog
On 2012/08/31 02:25:20, dfc wrote: > LGTM. Submitting as it's fairly superficial, has two LGTMs ...
11 years, 8 months ago (2012-08-31 05:47:12 UTC) #4
rog
11 years, 8 months ago (2012-08-31 05:48:01 UTC) #5
*** Submitted:

cmd/jujud: fix race in test

We should not call OpenPort until the new instance id has
hit the state.

We also fix a bug in firewaller where it called InstanceId even
when it needed to do nothing, and take the opportunity
to make the firewaller tests a little more concise now that we
have JujuConnSuite.

R=TheMue, dfc
CC=
https://codereview.appspot.com/6499056

https://codereview.appspot.com/6499056/diff/5001/worker/firewaller/firewaller...
File worker/firewaller/firewaller_test.go (right):

https://codereview.appspot.com/6499056/diff/5001/worker/firewaller/firewaller...
worker/firewaller/firewaller_test.go:84: env, err :=
environs.NewFromAttrs(config.Map())
On 2012/08/30 16:00:44, TheMue wrote:
> After merge you can use environs.New(config) here.

removed this logic. it's not testing anything that hasn't been tested elsewhere.
Sign in to reply to this message.

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