Fix rest tests failures on Windows platform

cherry picked from 2.3.x-rest