LPS-48887 Centralize all gc based tests' gc logic, to provide a reliable gc behavior