Fix a test hang on Windows.