test(session): Speed up some tests around dead worker cleanup

This removes or reduces the time that is waited in a number of tests by
allowing the grace period time be a configuration option on the
connection repository.
This commit is contained in:
Timothy Messier committed 2022-03-15 13:51:15 -04:00
1 parent 79670180a7
commit 9aa2d4cd84
8 files changed
+72 -52

No files matched your search

+1 -1
View File
@@ -303,7 +303,7 @@ func (c *Controller) registerJobs() error {
// registerSessionConnectionCleanupJob is a helper method to abstract
// registering the session connection cleanup job specifically.
func (c *Controller) registerSessionConnectionCleanupJob() error {
sessionConnectionCleanupJob, err := newSessionConnectionCleanupJob(c.ConnectionRepoFn, int(c.conf.StatusGracePeriodDuration.Seconds()))
sessionConnectionCleanupJob, err := newSessionConnectionCleanupJob(c.ConnectionRepoFn, c.conf.StatusGracePeriodDuration)
if err != nil {
return fmt.Errorf("error creating session cleanup job: %w", err)
}