launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/testing/constants.go (about) 1 // Copyright 2012, 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package testing 5 6 import ( 7 "time" 8 9 "launchpad.net/juju-core/utils" 10 ) 11 12 // ShortWait is a reasonable amount of time to block waiting for something that 13 // shouldn't actually happen. (as in, the test suite will *actually* wait this 14 // long before continuing) 15 const ShortWait = 50 * time.Millisecond 16 17 // LongWait is used when something should have already happened, or happens 18 // quickly, but we want to make sure we just haven't missed it. As in, the test 19 // suite should proceed without sleeping at all, but just in case. It is long 20 // so that we don't have spurious failures without actually slowing down the 21 // test suite 22 const LongWait = 10 * time.Second 23 24 var LongAttempt = &utils.AttemptStrategy{ 25 Total: LongWait, 26 Delay: ShortWait, 27 }