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

Side by Side Diff: worker/instancepoller/machine_test.go

Issue 93410043: Extract errors package to github.com/juju/errors
Patch Set: Created 9 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 Canonical Ltd. 1 // Copyright 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details. 2 // Licensed under the AGPLv3, see LICENCE file for details.
3 3
4 // TODO(wallyworld) - move to instancepoller_test 4 // TODO(wallyworld) - move to instancepoller_test
5 package instancepoller 5 package instancepoller
6 6
7 import ( 7 import (
8 stderrors "errors" 8 stderrors "errors"
9 "fmt" 9 "fmt"
10 "math" 10 "math"
11 "strings" 11 "strings"
12 "sync" 12 "sync"
13 "sync/atomic" 13 "sync/atomic"
14 "time" 14 "time"
15 15
16 "github.com/juju/errors"
16 jc "github.com/juju/testing/checkers" 17 jc "github.com/juju/testing/checkers"
17 gc "launchpad.net/gocheck" 18 gc "launchpad.net/gocheck"
18 19
19 "launchpad.net/juju-core/errors"
20 "launchpad.net/juju-core/instance" 20 "launchpad.net/juju-core/instance"
21 "launchpad.net/juju-core/state" 21 "launchpad.net/juju-core/state"
22 "launchpad.net/juju-core/state/api/params" 22 "launchpad.net/juju-core/state/api/params"
23 coretesting "launchpad.net/juju-core/testing" 23 coretesting "launchpad.net/juju-core/testing"
24 "launchpad.net/juju-core/testing/testbase" 24 "launchpad.net/juju-core/testing/testbase"
25 ) 25 )
26 26
27 var _ = gc.Suite(&machineSuite{}) 27 var _ = gc.Suite(&machineSuite{})
28 28
29 type machineSuite struct { 29 type machineSuite struct {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 m.mu.Lock() 405 m.mu.Lock()
406 defer m.mu.Unlock() 406 defer m.mu.Unlock()
407 return m.life 407 return m.life
408 } 408 }
409 409
410 func (m *testMachine) setLife(life state.Life) { 410 func (m *testMachine) setLife(life state.Life) {
411 m.mu.Lock() 411 m.mu.Lock()
412 defer m.mu.Unlock() 412 defer m.mu.Unlock()
413 m.life = life 413 m.life = life
414 } 414 }
OLDNEW

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