Issue #3423329 by catch, kristiaanvandeneynde, dww, alexpott: Prevent session garbage collection during functional tests
mentioned in commit 9f0c3d9f