tests: enforced a full GC cycle in more memory-intensive test cases that may confuse leak testing due to GC latencies.