Merge test cleanup from 3.5 into 3.6