Issue #16115: Merge test improvements from 3.3.