Gradient-based solver test fix