chore: Reduce test times (#3856)

* chore: Reduce test times

* Rename IncludeProvisionerD to IncludeProvisionerDaemon

* Make  TestTemplateDAUs use Tailnet
This commit is contained in:
Kyle Carberry
2022-09-04 11:28:09 -05:00
committed by GitHub
parent 271d075667
commit 67c4605370
38 changed files with 204 additions and 289 deletions

View File

@ -44,27 +44,3 @@ func Eventually(ctx context.Context, t testing.TB, condition func(context.Contex
}
}
}
// EventuallyShort is a convenience function that runs Eventually with
// IntervalFast and times out after WaitShort.
func EventuallyShort(t testing.TB, condition func(context.Context) bool) bool {
ctx, cancel := context.WithTimeout(context.Background(), WaitShort)
defer cancel()
return Eventually(ctx, t, condition, IntervalFast)
}
// EventuallyMedium is a convenience function that runs Eventually with
// IntervalMedium and times out after WaitMedium.
func EventuallyMedium(t testing.TB, condition func(context.Context) bool) bool {
ctx, cancel := context.WithTimeout(context.Background(), WaitMedium)
defer cancel()
return Eventually(ctx, t, condition, IntervalMedium)
}
// EventuallyLong is a convenience function that runs Eventually with
// IntervalSlow and times out after WaitLong.
func EventuallyLong(t testing.TB, condition func(context.Context) bool) bool {
ctx, cancel := context.WithTimeout(context.Background(), WaitLong)
defer cancel()
return Eventually(ctx, t, condition, IntervalSlow)
}