[1.7.x] Reformatted SQL in unit test for ticket #24051