Merge pull request #4105 from hashicorp/b-flaky-deadline-tests

Fix flaky deadline tests
This commit is contained in:
Alex Dadgar
2018-04-03 17:21:38 -07:00
committed by GitHub
2 changed files with 14 additions and 8 deletions

View File

@@ -62,6 +62,11 @@ func TestMultiplier() int64 {
return 1
}
// Timeout takes the desired timeout and increases it if running in Travis
func Timeout(original time.Duration) time.Duration {
return original * time.Duration(TestMultiplier())
}
func IsTravis() bool {
_, ok := os.LookupEnv(TravisRunEnv)
return ok