Merge lp://staging/~rogpeppe/juju-core/306-worker-fix-go1.0 into lp://staging/~juju/juju-core/trunk
Proposed by
Roger Peppe
Status: | Merged |
---|---|
Merged at revision: | 1232 |
Proposed branch: | lp://staging/~rogpeppe/juju-core/306-worker-fix-go1.0 |
Merge into: | lp://staging/~juju/juju-core/trunk |
Diff against target: |
136 lines (+19/-13) 2 files modified
worker/runner.go (+2/-2) worker/runner_test.go (+17/-11) |
To merge this branch: | bzr merge lp://staging/~rogpeppe/juju-core/306-worker-fix-go1.0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+165466@code.staging.launchpad.net |
Description of the change
To post a comment you must log in.
Reviewers: mp+165466_ code.launchpad. net,
Message:
Please take a look.
Description:
worker: fix for go1.0.3 compatibility
oops.
https:/ /code.launchpad .net/~rogpeppe/ juju-core/ 306-worker- fix-go1. 0/+merge/ 165466
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/9682047/
Affected files: runner_ test.go
A [revision details]
M worker/runner.go
M worker/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: worker/runner.go tomb.Dead( ):
=== modified file 'worker/runner.go'
--- worker/runner.go 2013-05-23 18:30:17 +0000
+++ worker/runner.go 2013-05-23 18:53:22 +0000
@@ -92,8 +92,8 @@
case runner.startc <- startReq{id, startFunc}:
return nil
case <-runner.
- return ErrDead
}
+ return ErrDead
}
// StopWorker stops the worker associated with the given id. tomb.Dead( ):
@@ -105,8 +105,8 @@
case runner.stopc <- id:
return nil
case <-runner.
- return ErrDead
}
+ return ErrDead
}
func (runner *Runner) Wait() error {
Index: worker/ runner_ test.go runner_ test.go' runner_ test.go 2013-05-23 18:30:17 +0000 runner_ test.go 2013-05-23 18:53:22 +0000 art(c *C) { NewRunner( noneFatal, noImportance) arter() StartWorker( "id", starter.start) StartWorker( "id", testWorkerStart (starter) ) assertStarted( c, true)
=== modified file 'worker/
--- worker/
+++ worker/
@@ -48,7 +48,7 @@
func (*runnerSuite) TestOneWorkerSt
runner := worker.
starter := newTestWorkerSt
- err := runner.
+ err := runner.
c.Assert(err, IsNil)
starter.
@@ -59,7 +59,7 @@ start(c *C) { NewRunner( noneFatal, noImportance) arter() StartWorker( "id", starter.start) StartWorker( "id", testWorkerStart (starter) ) assertStarted( c, true)
func (*runnerSuite) TestOneWorkerRe
runner := worker.
starter := newTestWorkerSt
- err := runner.
+ err := runner.
c.Assert(err, IsNil)
starter.
@@ -78,7 +78,7 @@ NewRunner( allFatal, noImportance) arter() StartWorker( "id", starter.start) StartWorker( "id", testWorkerStart (starter) ) eFatalError( c *C) { NewRunner( allFatal, noImportance) arter() StartWorker( "id", starter.start) StartWorker( "id", testWorkerStart (starter) ) assertStarted( c, true) artStop( c *C) { NewRunner( allFatal, noImportance) arter() StartWorker( "id", starter.start) StartWorker( "id", testWorkerStart (starter) ) assertStarted( c, tr...
runner := worker.
starter := newTestWorkerSt
starter.startErr = errors.New("cannot start test task")
- err := runner.
+ err := runner.
c.Assert(err, IsNil)
err = runner.Wait()
c.Assert(err, Equals, starter.startErr)
@@ -87,7 +87,7 @@
func (*runnerSuite) TestOneWorkerDi
runner := worker.
starter := newTestWorkerSt
- err := runner.
+ err := runner.
c.Assert(err, IsNil)
starter.
dieErr := errors.New("error when running")
@@ -100,7 +100,7 @@
func (*runnerSuite) TestOneWorkerSt
runner := worker.
starter := newTestWorkerSt
- err := runner.
+ err := runner.
c.Assert(err, IsNil)
starter.