Update file copy test to wait for copy to finish.

This commit is contained in:
Jimmy Campbell 2017-06-27 10:02:24 -07:00
Родитель 8d68c712e2
Коммит eeabd5c836
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -305,6 +305,13 @@ namespace Microsoft.IIS.Administration.Tests
Assert.NotNull(copyInfo); Assert.NotNull(copyInfo);
//
// Wait for copy to finish
HttpResponseMessage res = null;
do {
res = client.GetAsync(Utils.Self(copyInfo)).Result;
} while (res.StatusCode == HttpStatusCode.OK);
var copyParent = new DirectoryInfo(physicalPath).Parent.FullName; var copyParent = new DirectoryInfo(physicalPath).Parent.FullName;
var copyPhysicalPath = Environment.ExpandEnvironmentVariables(copyInfo["file"].Value<string>("physical_path")); var copyPhysicalPath = Environment.ExpandEnvironmentVariables(copyInfo["file"].Value<string>("physical_path"));