Properly cleanup on interrupt in api-test.