Speed up attach/detach controller integration tests

Internal attach/detach controller timers should be configurable and tests
should use much shorter values.

reconcilerSyncDuration is deliberately left out of TimerConfig because it's
the only one that's not a constant one, it's configurable by user.
This commit is contained in:
Jan Safranek
2017-06-16 12:15:04 +02:00
parent 6742fda0bb
commit b28790a63b
4 changed files with 45 additions and 22 deletions

View File

@@ -166,7 +166,9 @@ func startAttachDetachController(ctx ControllerContext) (bool, error) {
ctx.Cloud,
ProbeAttachableVolumePlugins(ctx.Options.VolumeConfiguration),
ctx.Options.DisableAttachDetachReconcilerSync,
ctx.Options.ReconcilerSyncLoopPeriod.Duration)
ctx.Options.ReconcilerSyncLoopPeriod.Duration,
attachdetach.DefaultTimerConfig,
)
if attachDetachControllerErr != nil {
return true, fmt.Errorf("failed to start attach/detach controller: %v", attachDetachControllerErr)
}