Commit Graph
9 Commits
Author SHA1 Message Date
Timothy Messier 9aa2d4cd84 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.
2022-03-15 13:51:15 -04:00
Timothy Messier 4de6464978 refact(session): Make CloseDeadConnectionsForWorker more testable
The query for CloseDeadConnectionsForWorker includes a time comparison
to exclude results that are too close to the current time. This is done
to account for a delay in reporting by the worker. However, since the
delay was hardcoded in the query, it made it difficult to test.

This moves the delay duration into a parameter that is set on the
repository. The amount of the delay can be set at repository creation
time using the new WithWorkerStateDelay option. This defaults to the
previously hardcoded amount.

This will allow tests to control the delay to exercise this
functionality fully.
2022-03-15 12:11:31 -04:00
Jeff Mitchell 6f34da8923 Add cleanup of dead connections no longer reported by a worker (#1220) 2021-05-14 13:23:12 -04:00
Michael Gaffney 0b5ac930ac Fix godoc wording 2021-05-12 12:22:04 -04:00
Jim c281e808d6 refactor to use WithOrderByCreateTime(...) (#1058) 2021-04-02 19:13:48 -04:00
Jeff Mitchell 6cd97a4a6e Add support for recursive listing (#885) 2021-01-25 19:37:40 -05:00
Jim cfc76eb88f add support for WithSessionIds in ListSesions (#395) 2020-09-22 10:41:42 -04:00
Jim 5764b2c70a return States as a field of Connection repo operations. (#382) 2020-09-20 15:54:39 -04:00
Jim 611288bdc7 basic sessions (#337) 2020-09-16 12:02:02 -04:00