Some more test cleanup to not create so many threads. See #3320