CB-5125 replace exec with spawn and tests