~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/cmd/jujud/upgrade_mongo_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        return mock.now
50
50
}
51
51
 
 
52
func (mock *mockClock) NewTimer(time.Duration) clock.Timer {
 
53
        panic("unexpected call to NewTimer")
 
54
}
 
55
 
52
56
func (mock *mockClock) After(wait time.Duration) <-chan time.Time {
53
57
        mock.now = mock.now.Add(wait)
54
58
        return time.After(time.Microsecond)
55
59
}
56
60
 
57
61
func (mock *mockClock) AfterFunc(d time.Duration, f func()) clock.Timer {
58
 
        if d > 0 {
59
 
                mock.now = mock.now.Add(d)
60
 
        }
61
 
        return time.AfterFunc(0, f)
 
62
        panic("unexpected call to AfterFunc")
62
63
}
63
64
 
64
65
func retryCallArgs() retry.CallArgs {