Skip to content

Add pause between computing lastModified date and executing task #27073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
8 commits merged into from
Nov 3, 2020
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public void BundlesScopedCssFiles_DoesNotOverrideBundleForSameContents()

[Fact]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/25623")]
public void BundlesScopedCssFiles_UpdatesBundleWhenContentsChange()
public async System.Threading.Tasks.Task BundlesScopedCssFiles_UpdatesBundleWhenContentsChange()
{
// Arrange
var expectedFile = Path.Combine(Directory.GetCurrentDirectory(), $"{Guid.NewGuid():N}.css");
Expand Down Expand Up @@ -382,14 +382,14 @@ public void BundlesScopedCssFiles_UpdatesBundleWhenContentsChange()
}),
};

await System.Threading.Tasks.Task.Delay(1000);
taskInstance.Execute();

// Assert
Assert.True(result);
Assert.True(File.Exists(expectedFile));
var actualContents = File.ReadAllText(expectedFile);
Assert.Equal(UpdatedBundleContent, actualContents, ignoreLineEndingDifferences: true);

Assert.NotEqual(lastModified, File.GetLastWriteTimeUtc(expectedFile));
}
}
Expand Down