Skip to content

Commit 8dbd0c6

Browse files
committed
Be even more paranoid about time advancing in test
1 parent e9c503a commit 8dbd0c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithAllFeatures.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,17 @@ public void It_does_not_build_when_nobuild_is_set(string targetFramework, string
107107
buildCommand.Execute().Should().Pass();
108108

109109
// modify all project files, which would force recompilation if we were to build during publish
110+
WaitForUtcNowToAdvance();
110111
foreach (string projectFile in EnumerateFiles(buildCommand, "*.csproj"))
111112
{
112113
File.AppendAllText(projectFile, " ");
113114
}
114115

115116
// capture modification time of all binaries before publish
116117
var modificationTimes = GetLastWriteTimesUtc(buildCommand, "*.exe", "*.dll", "*.resources", "*.pdb");
117-
WaitForUtcNowToAdvance();
118118

119119
// publish (with NoBuild set)
120+
WaitForUtcNowToAdvance();
120121
publishCommand.Execute("/p:NoBuild=true").Should().Pass();
121122
publishCommand.GetOutputDirectory(targetFramework).Should().OnlyHaveFiles(expectedPublishFiles);
122123

0 commit comments

Comments
 (0)