Skip to content
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

Attempt to stabilize ConcurrentCompilationDoesNotBreakCaching test #5571

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ method Foo() {
}

[Fact]
public async Task ConcurrentCompilationDoesNotBreakCaching() {
public async Task CachingWorksWhenManyChangesAreMadeWithoutWaits() {
var largeImport1 = GetLargeFile("Imported1", 100);
var largeImport2 = GetLargeFile("Imported2", 100);

Expand All @@ -395,16 +395,15 @@ method Bar() {
}";

var temp = GetFreshTempPath();
var project = CreateOpenAndWaitForResolve("", Path.Combine(temp, "dfyconfig.toml"));
var imported1 = CreateAndOpenTestDocument(largeImport1, Path.Combine(temp, "imported1.dfy"));
var imported2 = CreateAndOpenTestDocument(largeImport2, Path.Combine(temp, "imported2.dfy"));
var importer = CreateAndOpenTestDocument(importerSource, Path.Combine(temp, "importer.dfy"));
var project = CreateOpenAndWaitForResolve("", Path.Combine(temp, "dfyconfig.toml"));

var before1 = await WaitAndCountHits(imported1);
var before2 = await WaitAndCountHits(imported2);
var beforeImporter = await WaitAndCountHits(importer);

ApplyChange(ref importer, new Range(0, 0, 0, 0), "// added this comment\n");
for (int i = 0; i < 100; i++) {
ApplyChange(ref importer, new Range(0, 0, 0, 0), "// added this comment\n");
}
Expand Down
Loading