Skip to content

Commit

Permalink
Update file copy test to wait for copy to finish.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyca15 committed Jun 27, 2017
1 parent 8d68c71 commit eeabd5c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/Microsoft.IIS.Administration.Tests/Files.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,13 @@ public void CopyFile()

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 copyPhysicalPath = Environment.ExpandEnvironmentVariables(copyInfo["file"].Value<string>("physical_path"));

Expand Down

0 comments on commit eeabd5c

Please sign in to comment.